gdb/testsuite: use gdb_get_line_number
Replaces a hard coded line number with a use of gdb_get_line_number. I suspect that the line number has, over time, come adrift from where it was supposed to be stopping. When the test was first added, line 770 pointed at the final 'return 0' in function main. Over time, as things have been added, line 770 now points at some random location in the middle of main. So, I've marked the 'return 0' with a comment, and now the test will always stop there. I also removed an old comment from 1997 talking about how these tests will only pass with the HP compiler, followed by an additional comment from 2000 saying that the tests now pass with GCC. I get the same results before and after this change.
This commit is contained in:
parent
ca8775833b
commit
707ed39ac5
2 changed files with 3 additions and 17 deletions
|
@ -801,5 +801,5 @@ int main()
|
|||
|
||||
arg.method(empty);
|
||||
|
||||
return 0;
|
||||
return 0; /* Final breakpoint. */
|
||||
}
|
||||
|
|
|
@ -278,23 +278,9 @@ do_tests
|
|||
|
||||
# More tests for different kinds of template parameters,
|
||||
# templates with partial specializations, nested templates, etc.
|
||||
# These have been tested only with HP aCC. They probably won't
|
||||
# work with other compilers because of differences in mangling
|
||||
# schemes.
|
||||
# Added by Satish Pai <pai@apollo.hp.com> 1997-09-25
|
||||
# As of 2000-06-03, C++ support has been improved to the point that g++ can
|
||||
# pass all of theses, excluding what appears to be one that exposes a stabs bug. - djb
|
||||
|
||||
# I don't know how HP could be passing these tests without this. They
|
||||
# weren't breakpointing past a point where the below expressions were
|
||||
# initialized in the actual source. - djb
|
||||
|
||||
gdb_test "b 770" \
|
||||
"Breakpoint .* at .*, line 770."
|
||||
|
||||
gdb_test "c" \
|
||||
"Continuing.*Breakpoint .*" \
|
||||
"continue to line 770"
|
||||
gdb_breakpoint [gdb_get_line_number "Final breakpoint"]
|
||||
gdb_continue_to_breakpoint "Final breakpoint"
|
||||
|
||||
gdb_test "print fint" \
|
||||
"\\$\[0-9\]* = \\{x = 0, t = 0\\}"
|
||||
|
|
Loading…
Add table
Reference in a new issue