Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / utils / lui / eventwin.py
blob4ff8dd0b4eb7e2d44cfc6469eadca8dadb169867
1 ##===-- eventwin.py ------------------------------------------*- Python -*-===##
2 ##
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 ##
7 ##===----------------------------------------------------------------------===##
9 import cui
10 import lldb
11 import lldbutil
14 class EventWin(cui.TitledWin):
15 def __init__(self, x, y, w, h):
16 super(EventWin, self).__init__(x, y, w, h, "LLDB Event Log")
17 self.win.scrollok(1)
18 super(EventWin, self).draw()
20 def handleEvent(self, event):
21 if isinstance(event, lldb.SBEvent):
22 self.win.scroll()
23 h = self.win.getmaxyx()[0]
24 self.win.addstr(h - 1, 0, lldbutil.get_description(event))
25 return