mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 18:32:32 +08:00
* gdb.base/break.exp ("breakpoint line number"): Make sure the
default source file is set properly before running this test.
This commit is contained in:
@ -92,6 +92,15 @@ gdb_test "break $srcfile:factorial" \
|
|||||||
#
|
#
|
||||||
# test break at line number
|
# test break at line number
|
||||||
#
|
#
|
||||||
|
# Note that the default source file is the last one whose source text
|
||||||
|
# was printed. For native debugging, before we've executed the
|
||||||
|
# program, this is the file containing main, but for remote debugging,
|
||||||
|
# it's wherever the processor was stopped when we connected to the
|
||||||
|
# board. So, to be sure, we do a list command.
|
||||||
|
#
|
||||||
|
gdb_test "list main" \
|
||||||
|
".*main \\(argc, argv, envp\\).*" \
|
||||||
|
"use `list' to establish default source file"
|
||||||
gdb_test "break 79" \
|
gdb_test "break 79" \
|
||||||
"Breakpoint.*at.* file .*$srcfile, line 79\\." \
|
"Breakpoint.*at.* file .*$srcfile, line 79\\." \
|
||||||
"breakpoint line number"
|
"breakpoint line number"
|
||||||
|
Reference in New Issue
Block a user