aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-02-08 11:37:44 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-02-11 17:35:14 +0000
commitce068c5f45aeebc9729499253e0a8f1f29be65c2 (patch)
treec171af9481d70451fa50a355b23a268537a2cb52 /gdb/gdb.c
parentbb146a79c7d65e2b578e8c3f652cb118c63741e5 (diff)
downloadgdb-ce068c5f45aeebc9729499253e0a8f1f29be65c2.zip
gdb-ce068c5f45aeebc9729499253e0a8f1f29be65c2.tar.gz
gdb-ce068c5f45aeebc9729499253e0a8f1f29be65c2.tar.bz2
gdb: don't print global thread-id to CLI in describe_other_breakpoints
I noticed that describe_other_breakpoints was printing the global thread-id to the CLI. For CLI output we should be printing the inferior local thread-id (e.g. "2.1"). This can be seen in the following GDB session: (gdb) info threads Id Target Id Frame 1.1 Thread 4065742.4065742 "bp-thread-speci" main () at /tmp/bp-thread-specific.c:27 * 2.1 Thread 4065743.4065743 "bp-thread-speci" main () at /tmp/bp-thread-specific.c:27 (gdb) break foo thread 2.1 Breakpoint 3 at 0x40110a: foo. (2 locations) (gdb) break foo thread 1.1 Note: breakpoint 3 (thread 2) also set at pc 0x40110a. Note: breakpoint 3 (thread 2) also set at pc 0x40110a. Breakpoint 4 at 0x40110a: foo. (2 locations) Notice that GDB says: Note: breakpoint 3 (thread 2) also set at pc 0x40110a. The 'thread 2' in here is using the global thread-id, we should instead say 'thread 2.1' which corresponds to how the user specified the breakpoint. This commit fixes this issue and adds a test. Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/gdb.c')
0 files changed, 0 insertions, 0 deletions