aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-01-16 15:00:11 +0100
committerTom de Vries <tdevries@suse.de>2025-01-16 15:00:11 +0100
commit18d2e794052bd6386e510ae367e0d7599e847426 (patch)
treeb7e31339ec9205db72ffe15caf6d15b38ce4e6e5 /gdb/testsuite
parent72187c317dce624b6e4e9410c34cc2424fc2ff34 (diff)
downloadgdb-18d2e794052bd6386e510ae367e0d7599e847426.zip
gdb-18d2e794052bd6386e510ae367e0d7599e847426.tar.gz
gdb-18d2e794052bd6386e510ae367e0d7599e847426.tar.bz2
[gdb/testsuite] Fix gdb.dwarf2/implptr.exp regression
When running test-case gdb.dwarf2/implptr.exp on target board unix/-m32, we get: ... (gdb) PASS: gdb.dwarf2/implptr.exp: print ***l in implptr:bar break implptr.c:34^M No compiled code for line 34 in file "implptr.c".^M Make breakpoint pending on future shared library load? (y or [n]) n^M (gdb) FAIL: $exp: set baz breakpoint for implptr (got interactive prompt) ... This is a regression since commit dcaa85e58c4 ("gdb: reject inserting breakpoints between functions"). The .debug_line info does not contain an entry with a line number lower than 36, so gdb cannot map it to an address. Fix this by setting a breakpoint at the function containing line 34 instead. Tested on x86_64-linux. PR testsuite/32477 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32477
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index a3f9c61..fa1b68e 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -63,7 +63,7 @@ proc implptr_test_bar {} {
proc implptr_test_baz {} {
global csrcfile
set line [gdb_get_line_number "baz breakpoint" $csrcfile]
- gdb_test "break implptr.c:$line" "Breakpoint 3.*" \
+ gdb_test "break add" "Breakpoint 3.*" \
"set baz breakpoint for implptr"
gdb_continue_to_breakpoint "continue to baz breakpoint for implptr"