[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for ppc64le
authorTom de Vries <tdevries@suse.de>
Mon, 12 Sep 2022 08:05:18 +0000 (10:05 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 12 Sep 2022 08:05:18 +0000 (10:05 +0200)
commit52b920c5d2098a7319bcae3f31c0d1fb58d40c38
tree1985e7f8fdbff590a560e6778e662420496bd28a
parent9e338b141b5f9ab104bb87aea6f8358c9dfa8f77
[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for ppc64le

In commit cd919f5533c ("[gdb/testsuite] Fix
gdb.dwarf2/dw2-dir-file-name.exp"), I made gdb.dwarf2/dw2-dir-file-name.exp
independent of prologue analyzers, using this change:
...
-       gdb_breakpoint $func
+       gdb_breakpoint *$func
...

That however caused a regression on ppc64le.  For PowerPC, as described in the
ELFv2 ABI, a function can have a global and local entry point.

Setting a breakpoint on *$func effectively creates a breakpoint for the global
entry point, so if the function is entered through the local entry point, the
breakpoint doesn't trigger.

Fix this by reverting commit cd919f5533c, and setting the breakpoint on
${func}_label instead.

Tested on x86_64-linux and ppc64le-linux.
gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
gdb/testsuite/lib/gdb.exp