This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add some testcases


    * 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(-)

diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index e648a6b..30c3078 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -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.
 
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.*"
+
 # Done!
 #
 gdb_exit
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index fcc9a8d..d15130a 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -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
     }
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]