diff options
author | jemarch <jemarch> | 2013-10-21 12:42:02 +0000 |
---|---|---|
committer | jemarch <jemarch> | 2013-10-21 12:42:02 +0000 |
commit | 2cec45808a2a3f4ba7fcad1a4b01f64b0e83a194 (patch) | |
tree | c77dcaaf67a29181ce513f3bb3c0e1560e3ee904 | |
parent | c8eb88c30c69109495d92e053a63116d084033e0 (diff) | |
download | gdb-2cec45808a2a3f4ba7fcad1a4b01f64b0e83a194.tar.gz |
2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com>
PR gdb/15986
* gdb.base/run.c (main): gdb_get_line_number tag added for
commands.exp.
(factorial): Likewise.
* gdb.base/commands.exp (watchpoint_command_test): Use
gdb_get_line_number in order to determine the locations in run.c
where local_var is detected to go out of scope.
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/commands.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/run.c | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9bb575e9775..1edfc930db5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,16 @@ 2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com> + PR gdb/15986 + * gdb.base/run.c (main): gdb_get_line_number tag added for + commands.exp. + (factorial): Likewise. + + * gdb.base/commands.exp (watchpoint_command_test): Use + gdb_get_line_number in order to determine the locations in run.c + where local_var is detected to go out of scope. + +2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com> + * gdb.base/gnu_vector.exp: Care about endianness when casting scalars to vectors. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index b608e0cf6a9..8313dbf6719 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -308,6 +308,8 @@ proc watchpoint_command_test {} { "end commands on watch" set test "continue with watch" + set lno_1 [gdb_get_line_number "commands.exp: hw local_var out of scope" "run.c"] + set lno_2 [gdb_get_line_number "commands.exp: local_var out of scope" "run.c"] gdb_test_multiple "continue" "$test" { -re "No symbol \"value\" in current context.\r\n$gdb_prompt $" { # Happens if GDB actually runs the watchpoints commands, @@ -315,7 +317,7 @@ proc watchpoint_command_test {} { # scope. fail $test } - -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(53|77).*$gdb_prompt $" { + -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:($lno_1|$lno_2).*$gdb_prompt $" { pass $test } } diff --git a/gdb/testsuite/gdb.base/run.c b/gdb/testsuite/gdb.base/run.c index c1c3a1ba3bd..c7293ced2db 100644 --- a/gdb/testsuite/gdb.base/run.c +++ b/gdb/testsuite/gdb.base/run.c @@ -50,7 +50,7 @@ char *argv[], **envp; #endif { #ifdef FAKEARGV - printf ("%d\n", factorial (1)); + printf ("%d\n", factorial (1)); /* commands.exp: hw local_var out of scope */ #else if (argc != 2) { printf ("usage: factorial <number>\n"); @@ -75,4 +75,4 @@ int factorial (value) int value; } local_var = value; return (value); -} +} /* commands.exp: local_var out of scope */ |