Using TUI commands when debugging with GDB

    Today, when I was using GDB, by mistake I have typed refresh. Immediately my window was split into 2 and upper half was loaded with the source code I was debugging. Finally it was like Visual studio debugger [Showing source in the top frame and commands in the bottom frame]. I like this feature very much and but I did not know that it is available in GDB.
Then I did some research about that and came to know about TUI commands. TUI stands for Text User Interface. We can use TUI commands like layout, info, refresh in GDB. We can see the source code of our debugging program by executing “layout src” command in GDB. Similarly, we can see assembly instructions and regs values also. You can read more about TUI commands at this link. I have attached screenshot of my GDB. By seeing that, you can get the overview of how it looks like. In the src layout, we can see our breakpoints [Marked with B+ on left side] and at which step our program is executing [Marked with > on left side and highlighted text].

Advertisements

Newer entries »