]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix bp loc in gdb.server/fetch-exec-and-args.exp
authorTom de Vries <tdevries@suse.de>
Wed, 8 Oct 2025 20:32:00 +0000 (22:32 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 8 Oct 2025 20:32:00 +0000 (22:32 +0200)
With test-case gdb.server/fetch-exec-and-args.exp, on aarch64-linux I run into:
...
(gdb) break 28^M
Breakpoint 1 at 0xfffff7fd7b8c: file ../sysdeps/aarch64/dl-start.S, line 30.^M
(gdb) continue^M
Continuing.^M
^M
Breakpoint 1, _start () at ../sysdeps/aarch64/dl-start.S:30^M
30              mov     x0, sp^M
(gdb) PASS: $exp: packet=on: test_exec_and_arg_fetch: \
  continue to breakpoint: run to breakpoint
print argc^M
No symbol "argc" in current context.^M
(gdb) FAIL: $exp: packet=on: test_exec_and_arg_fetch: print argc
...

The problem is that the "break 28" is not specific about the file.

Fix this by setting the breakpoint on fetch-exec-and-args.c:28.

Tested on aarch64-linux.

PR testsuite/33522
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33522

gdb/testsuite/gdb.server/fetch-exec-and-args.exp

index 51adc68af99456ffe0015ddf07d44242f7b08b94..7c7750e7db22cdb928b935f1341b3812882313e8 100644 (file)
@@ -113,7 +113,7 @@ proc_with_prefix test_exec_and_arg_fetch { packet } {
 
     gdbserver_run "a b c"
 
-    gdb_breakpoint [gdb_get_line_number "Break here"]
+    gdb_breakpoint $::srcfile:[gdb_get_line_number "Break here"]
     gdb_continue_to_breakpoint "run to breakpoint"
 
     # Look in the inferior to check the arguments were passed