--- /dev/null
+#!/bin/sh
+gdb -ex 'source stack_dump.py' \
+ -ex 'tui new-layout asm_debug {-horizontal asm 2 stack 1 regs 1} 1 status 0 cmd 1' \
+ -ex 'layout asm_debug' \
+ -ex 'focus cmd' \
+ -ex 'break main' \
+ -ex 'run' \
+ ./a.out
--- /dev/null
+class history_window:
+ def __init__(self, tui_window):
+ self.win = tui_window
+
+ def render(self):
+ height = self.win.height
+ width = self.win.width
+ lines = self.get_stack()
+ self.win.erase()
+ for l in lines:
+ self.win.write(l)
+
+ def get_stack(self):
+ return []
+
+ def close(self):
+ gdb.events.before_prompt.disconnect(self._before_prompt_listener)
+
+gdb.register_window_type('stack', history_window)
+