Getting GDB to display the entire multi-line statement

GDB, at least as it was configured by default in my Ubuntu 9.04, cannot handle multi-line statements. When I go through the code, GDB displays only the last line of the current statement, even if this statement spans multiple lines.

I know that I could use DDD or emacs as an interface for GDB, but I would prefer to solve this problem in GDB, if possible.

Does anyone know if there is a way to get GDB to do the right thing here?

+4
source share
2 answers

I am afraid that the answer is "no, there is no way to get gdb to do what you want." The string information in the symbol tables associates each code command with one source string (not the source string). gdb does not know that multiple source lines are associated with the same source expression.

+2
source

How about running GDB with a text user interface ?

gdb -tui 

This makes the world different from the ease of use of GDB.

+4
source

All Articles