TUI mode
debugging with TUI is more comfy for me personally, as you can view the source code and the disassembled version at the same time on different two window!
trivia fact that you might didn't know when using TUI mode:
- select some text by pressing shift first.
- search command in history is done as the same as bash's keybinding, Ctrl + r and Ctrl + s, see the GDB manual section 33.2.5 Command Line Editing > Readline Interaction > Searching for Commands in the History
- arrow up and down is replaced by Ctrl + p and Ctrl + n respectively, see the GDB manual section 25.2 Text User Interface > TUI Key Bindings
- I haven't figured out how to clear window command on TUI mode, yet (stackoverflow solution isn't working anymore).
- enable or disable (toggle) TUI mode: Ctrl + x + a
commands
- next - skip a subroutine
- step - enter a subroutine
- stepi - execute exactly one assembly instruction
- finish - execute until reach end of subroutine or stack frame
- display - if an old value of a variable changed, print the old and new values
p *<array>@<len>
- print an<array>
and specify the length with<len>
- more to explore: breakpoint tracepoint checkpoint watchpoint