aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-31 15:17:27 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-04-07 16:01:18 +0100
commit07c316ecaa2e47721b5e1281456e6b8b0d15c7ba (patch)
treed345f180246c27d027daf0b16fac14ca8c95c07b /gdb/xtensa-tdep.c
parent5783701b36f842b1a5057c02b62d67a0ad703834 (diff)
downloadgdb-07c316ecaa2e47721b5e1281456e6b8b0d15c7ba.zip
gdb-07c316ecaa2e47721b5e1281456e6b8b0d15c7ba.tar.gz
gdb-07c316ecaa2e47721b5e1281456e6b8b0d15c7ba.tar.bz2
gdb/tui: fix 'tui reg next/prev' command when data window is hidden
Start GDB like: $ gdb -q executable (gdb) start (gdb) layout src ... tui windows are now displayed ... (gdb) tui reg next At this point the data (register) window should be displayed, but will contain the message 'Register Values Unavailable', and at the console you'll see the message "unknown register group 'next'". The same happens with 'tui reg prev' (but the error message is slightly different). At this point you can continue to use 'tui reg next' and/or 'tui reg prev' and you'll keep getting the error message. The problem is that when the data (register) window is first displayed, it's current register group is nullptr. As a consequence tui_reg_next and tui_reg_prev (tui/tui-regs.c) will always just return nullptr, which triggers an error in tui_reg_command. In this commit I change tui_reg_next and tui_reg_prev so that they instead return the first and last register group respectively if the current register group is nullptr. So, after this, using 'tui reg next' will (in the above case) show the first register group, while 'tui reg prev' will display the last register group.
Diffstat (limited to 'gdb/xtensa-tdep.c')
0 files changed, 0 insertions, 0 deletions