aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/display.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/display.exp')
-rw-r--r--gdb/testsuite/gdb.base/display.exp60
1 files changed, 32 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index 59ac18d..760a2e0 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -48,13 +48,13 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# Some coverage stuff
#
-gdb_test "kill" ".*The program is not being run.*" ""
-gdb_test "detach" ".*" ""
-gdb_test "run" ".*" ""
+gdb_test "kill" ".*The program is not being run.*"
+gdb_test "detach" ".*"
+gdb_test "run" ".*"
gdb_load ${binfile}
-gdb_test "kill" ".*" ""
-gdb_test "detach" ".*" ""
+gdb_test "kill" ".*"
+gdb_test "detach" ".*"
# Ok, on to real life
#
@@ -85,8 +85,8 @@ gdb_test "c" ".*\[Ww\]atchpoint 3: sum.*\[1-9\]*: x/s &sum.*\[1-9\]*: /f sum = 1
gdb_test "c" ".*\[Ww\]atchpoint 3: sum.*\[1-9\]*: x/s &sum.*\[1-9\]*: /f sum = 2.80259693e.45\r\n\[1-9\]*: x/i &k.*\r\n\[1-9\]*: /x j = 0x0.*\[1-9\]*: i = 0.*" "second disp"
gdb_test "enab disp 6" ".*No display number 6..*" "catch err"
-gdb_test "disab disp 1" ".*" "disab"
-gdb_test "disab disp 2" ".*" ""
+gdb_test "disab disp 1" ".*" "disab disp 1"
+gdb_test "disab disp 2" ".*" "disab disp 2"
gdb_test "enab disp 1" ".*" "re-enab"
gdb_test "enab disp 1" ".*" "re-enab of enab"
gdb_test "undisp 5" ".*" "undisp"
@@ -117,46 +117,50 @@ gdb_expect {
timeout { fail "timeout" }
}
-gdb_test "disab 3" ".*.*" ""
+gdb_test "disab 3" ".*.*" "disab 3"
gdb_test "c" ".*Breakpoint 4.*" "watch off"
# Now the printf tests
#
gdb_test "fin" ".*Run till exit.*Value returned is.*= 10.*" "finish"
-gdb_test "s" ".*do_vars.*.*25" ""
-gdb_test "tb 35" ".*Breakpoint 5 a.*" ""
-gdb_test "c" ".*do_vars.*35.*35.*" ""
+gdb_test "s" ".*do_vars.*.*27.*"
+gdb_test "tb 37" ".*Breakpoint 5 a.*"
+gdb_test "c" ".*do_vars.*37.*37.*"
# Beat on printf a bit
#
-gdb_test "printf" ".*Argument required.*" ""
-gdb_test "printf %d" ".*Bad format string, missing.*" ""
-gdb_test "printf \"%d" ".*Bad format string, non-terminated.*" ""
-gdb_test "printf \"%d%d\",i" ".*Wrong number of arguments.*" ""
-gdb_test "printf \"\\\\!\\a\\f\\r\\t\\v\\b\"" ".*!.*" ""
+gdb_test "printf" ".*Argument required.*"
+gdb_test "printf %d" ".*Bad format string, missing.*"
+gdb_test "printf \"%d" ".*Bad format string, non-terminated.*"
+gdb_test "printf \"%d%d\",i" ".*Wrong number of arguments.*"
+gdb_test "printf \"\\\\!\\a\\f\\r\\t\\v\\b\"" ".*!.*"
gdb_test "printf \"\"" ".*" "re-set term"
-gdb_test "printf \"\\w\"" ".*Unrecognized escape character.*" ""
-gdb_test "printf \"%d\" j" ".*Invalid argument syntax.*" ""
+gdb_test "printf \"\\w\"" ".*Unrecognized escape character.*"
+gdb_test "printf \"%d\" j" ".*Invalid argument syntax.*"
# play with "p", too
#
-gdb_test "p/r j" ".*Undefined output format.*" ""
+gdb_test "p/r j" ".*Undefined output format.*"
gdb_test "p j" ".*" "debug test output"
-#gdb_test "x/rx j" ".*Cannot access memory.*" "no error!"
+
# x/0 j doesn't produce any output and terminates PA64 process when testing
-if [istarget "hppa*-hp-hpux11*"] {
- xfail "'x/0 j' terminate PA64 process - skipped test point"
+if [istarget "hppa2.0w-hp-hpux11*"] {
+ xfail "'x/0 j' terminates PA64 process - skipped test point"
} else {
- gdb_test "x/0 j" ".*" "x/0 j"
+ gdb_test "x/0 j" ".*"
+}
+if [istarget "hppa*-hp-hpux*"] {
+ # on HP-UX you could access the first page without getting an error
+ gdb_test "x/rx j" ".*(Cannot access|Error accessing) memory.*|.*0xa:\[ \t\]*\[0-9\]+.*"
}
gdb_test "p/0 j" ".*Item count other than 1 is meaningless.*" "p/0 j"
gdb_test "p/s sum" ".*Format letter.*is meaningless.*" " no s"
gdb_test "p/i sum" ".*Format letter.*is meaningless.*.*" "no i"
-gdb_test "p/a &sum" ".*= 0x.*<sum>.*" ""
-gdb_test "p/a main+1000" ".*= 0x.*<.*>.*" ""
-gdb_test "p/a \\\$pc" ".*= 0x.*<do_vars+.*>.*" ""
-gdb_test "p/a &j" ".*= 0x.*<.*>.*" ""
-gdb_test "p/a &&j" ".*A syntax error.*" ""
+gdb_test "p/a &sum" ".*= $hex.*<sum>.*"
+gdb_test "p/a main+1000" ".*= $hex.*<.*>.*"
+gdb_test "p/a \$pc" ".*= $hex.*<do_vars+.*>.*"
+gdb_test "p/a &j" ".*= $hex.*<do_vars+.*>.*"
+gdb_test "p/a &&j" ".*A parse error.*"
# Done!
#