Commit Message
* watchpoint working with non-existed variables
* "x" command working with inaccessible address
* "backtrace" command with "-n" parameter
---
gdb/testsuite/gdb.base/dfp-test.exp | 1 +
gdb/testsuite/gdb.base/display.exp | 2 ++
gdb/testsuite/gdb.base/watchpoint.exp | 5 ++++-
3 files changed, 7 insertions(+), 1 deletion(-)
Comments
* Fei Jie <feij.fnst@cn.fujitsu.com> [2015-10-23 09:41:52 +0800]:
> * watchpoint working with non-existed variables
> * "x" command working with inaccessible address
> * "backtrace" command with "-n" parameter
> ---
> diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
> index 6e21d9e..5ad7ec5 100644
> --- a/gdb/testsuite/gdb.base/display.exp
> +++ b/gdb/testsuite/gdb.base/display.exp
> @@ -188,6 +188,8 @@ gdb_test "print/a main+4" ".*= $hex.*<.*>.*"
> gdb_test "print/a \$pc" ".*= $hex.*<do_vars+.*>.*"
> gdb_test "print/a &&j" ".*A .* error in expression.*"
>
> +gdb_test "x 0xffffff" "0xffffff.*Cannot access memory at address.*"
> +
There's nothing to guarantee that this address will be unavailable on
all targets.
You have a couple of tests similar to this in a different patch, I
wonder if all these tests, that depend on a particular memory layout,
should be grouped together into a single, separate, test file, so it's
easier to skip them on targets where the tests are not appropriate.
Thanks,
Andrew
@@ -220,6 +220,7 @@ gdb_test "backtrace" ".*arg0_64 \\(arg0=0.1, arg1=1.0, arg2=2.0, arg3=3.0, arg4=
gdb_breakpoint arg0_128
gdb_continue_to_breakpoint "entry to arg0_128"
gdb_test "backtrace" ".*arg0_128 \\(arg0=0.1, arg1=1.0, arg2=2.0, arg3=3.0, arg4=4.0, arg5=5.0\\).*" "backtrace at arg0_128"
+gdb_test "backtrace -1" ".*0x\[0-9\]\{16\}.*at\ .*dfp-test.c.*"
# Test calling inferior function with DFP arguments or return value.
@@ -188,6 +188,8 @@ gdb_test "print/a main+4" ".*= $hex.*<.*>.*"
gdb_test "print/a \$pc" ".*= $hex.*<do_vars+.*>.*"
gdb_test "print/a &&j" ".*A .* error in expression.*"
+gdb_test "x 0xffffff" "0xffffff.*Cannot access memory at address.*"
+
# Done!
#
gdb_exit
@@ -65,9 +65,12 @@ proc initialize {} {
if [gdb_test "info break" "1\[ \]*breakpoint.*marker1.*\r\n2\[ \]*breakpoint.*marker2.*" "info break in watchpoint.exp" ] {
return 0
}
-
gdb_test "watch ival3" ".*\[Ww\]atchpoint 3: ival3.*" "set watchpoint on ival3"
+ gdb_test "watch donot_exist" "No symbol \"donot_exist\" in current context."
+ gdb_test "rwatch donot_exist" "No symbol \"donot_exist\" in current context."
+ gdb_test "awatch donot_exist" "No symbol \"donot_exist\" in current context."
+
if [gdb_test "info watch" "3\[ \]*.*watchpoint.*ival3" "watchpoint found in watchpoint/breakpoint table" ] {
return 0
}