[gdb/testsuite] Fix gdb.python/py-breakpoint.exp with libstdc++ debug info
authorTom de Vries <tdevries@suse.de>
Mon, 2 Jan 2023 10:59:17 +0000 (11:59 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 2 Jan 2023 10:59:17 +0000 (11:59 +0100)
commitb9877acc81ade609c503bbcff064e09d3e290a84
tree0cc9ef60c2b861b91ade4e9332c2c40f460cb50c
parentc217e3d54e17e2dcf6b02d109e219a1718ac130e
[gdb/testsuite] Fix gdb.python/py-breakpoint.exp with libstdc++ debug info

On x86_64-linux, I run into:
...
(gdb) python hbp1 = gdb.Breakpoint("add", type=gdb.BP_HARDWARE_BREAKPOINT)^M
Hardware assisted breakpoint 2 at 0x40072e: add. (7 locations)^M
(gdb) FAIL: gdb.python/py-breakpoint.exp: test_hardware_breakpoints: \
  Set hardware breakpoint
...
due to libstdc++ debug info:
...
$ gdb -q -batch outputs/gdb.python/py-breakpoint/py-breakpoint \
  -ex start \
  -ex "b add" \
  -ex "info break"
Temporary breakpoint 1 at 0x40076a: file py-breakpoint.c, line 50.

Temporary breakpoint 1, main (argc=1, argv=$hex) at py-breakpoint.c:50
50        int foo = 5;
Breakpoint 2 at 0x40072e: add. (7 locations)
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   <MULTIPLE>
2.1                         y   0x000000000040072e in add(int) at \
  py-breakpoint.c:39
2.2                         y   0x00007ffff7b131de in \
  (anonymous namespace)::fast_float::bigint::add at \
  ../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815
  ...
2.7                         y   0x00007ffff7b137e4 in \
  (anonymous namespace)::fast_float::bigint::add at \
  ../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815
...

Fix this by using qualified=True.

Tested on x86_64-linux.
PR testsuite/29910
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29910
gdb/testsuite/gdb.python/py-breakpoint.exp