diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-01-26 18:52:56 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-04-03 15:31:46 +0100 |
commit | 7421ccda7640f53d4096a51402ae28daa6c816c0 (patch) | |
tree | 63c616e5ba4027f2c70953e569954f7b26cdd5b8 /gdb/doc/gdb.texinfo | |
parent | 160444ec7fd7c6df81826b8e06aa32a2ac1df856 (diff) | |
download | gdb-7421ccda7640f53d4096a51402ae28daa6c816c0.zip gdb-7421ccda7640f53d4096a51402ae28daa6c816c0.tar.gz gdb-7421ccda7640f53d4096a51402ae28daa6c816c0.tar.bz2 |
gdb/tui: add a tui debugging flag
This commit adds 'set debug tui on|off' and 'show debug tui'. This
commit adds the control variable, and the printing macros in
tui/tui.h. I've then added some uses of these in tui.c and
tui-layout.c.
To help produce more useful debug output in tui-layout.c, I've added
some helper member functions in the class tui_layout_split, and also
moved the size_info struct out of tui_layout_split::apply into the
tui_layout_split class.
If tui debug is not turned on, then there should be no user visible
changes after this commit.
One thing to note is that, due to the way that the tui terminal is
often cleared, the only way I've found this useful is when I do:
(gdb) tui enable
(gdb) set logging file /path/to/file
(gdb) set logging debugredirect on
(gdb) set logging enable on
Additionally, gdb has some quirks when it comes to setting up logging
redirect and switching interpreters. Thus, the above only really
works if the logging is enabled after the tui is enabled, and disabled
again before the tui is disabled.
Enabling logging and switching interpreters can cause undefined
results, including crashes. This is an existing bug in gdb[1], and
has nothing directly to do with tui debug, but it is worth mentioning
here I think.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28948
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r-- | gdb/doc/gdb.texinfo | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 0e80ab8..af02517 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -29204,6 +29204,17 @@ The default display uses more space for line numbers and starts the source text at the next tab stop; the compact display uses only as much space as is needed for the line numbers in the current file, and only a single space to separate the line numbers from the source. + +@kindex set debug tui +@item set debug tui @r{[}on|off@r{]} +Turn on or off display of @value{GDBN} internal debug messages relating +to the TUI. + +@kindex show debug tui +@item show debug tui +Show the current status of displaying @value{GDBN} internal debug +messages relating to the TUI. + @end table Note that the colors of the TUI borders can be controlled using the |