aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-netbsd-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-04-13 15:12:17 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-07-20 17:29:39 +0100
commit7934cb137a779ca41123a673243027b1e6dd99e9 (patch)
tree6a9a30d23f930842014db300745932106eacfe16 /gdb/ppc-netbsd-tdep.c
parent9f26b04c3e95c84f3f44555b9db61c25a3741360 (diff)
downloadbinutils-7934cb137a779ca41123a673243027b1e6dd99e9.zip
binutils-7934cb137a779ca41123a673243027b1e6dd99e9.tar.gz
binutils-7934cb137a779ca41123a673243027b1e6dd99e9.tar.bz2
gdb: don't display inferior list for pending breakpoints
I noticed that in the 'info breakpoints' output, GDB sometimes prints the inferior list for pending breakpoints, this doesn't seem right to me. A pending breakpoint has no locations (at least, as far as we display things in the 'info breakpoints' output), so including an inferior list seems odd. Here's what I see right now: (gdb) info breakpoint 5 Num Type Disp Enb Address What 5 breakpoint keep y <PENDING> foo inf 1 (gdb) It's the 'inf 1' at the end of the line that I'm objecting too. To trigger this behaviour we need to be in a multi-inferior debug session. The breakpoint must have been non-pending at some point in the past, and so have a location assigned to it. The breakpoint becomes pending again as a result of a shared library being unloaded. When this happens the location itself is marked pending (via bp_location::shlib_disabled). In print_one_breakpoint_location, in order to print the inferior list we check that the breakpoint has a location, and that we have multiple inferiors, but we don't check if the location itself is pending. This commit adds that check, which means the output is now: (gdb) info breakpoint 5 Num Type Disp Enb Address What 5 breakpoint keep y <PENDING> foo (gdb) Which I think makes more sense -- indeed, the format without the inferior list is what we display for a pending breakpoint that has never had any locations assigned, so I think this change in behaviour makes GDB more consistent.
Diffstat (limited to 'gdb/ppc-netbsd-tdep.c')
0 files changed, 0 insertions, 0 deletions