aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-21 22:58:39 +0000
committerPedro Alves <palves@redhat.com>2012-02-21 22:58:39 +0000
commitfdcfef12c3bbebb20583132c2ba8a86ce299fd57 (patch)
tree37cf635cb6f0ad6ed3f945ca004f28fbd3820835 /gdb/testsuite
parent516be0c504c13f018dce335686f46b610c2f632b (diff)
downloadgdb-fdcfef12c3bbebb20583132c2ba8a86ce299fd57.zip
gdb-fdcfef12c3bbebb20583132c2ba8a86ce299fd57.tar.gz
gdb-fdcfef12c3bbebb20583132c2ba8a86ce299fd57.tar.bz2
2012-02-21 Pedro Alves <palves@redhat.com>
* gdb.trace/unavailable.exp (gdb_collect_globals_test): Use with_test_prefix.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.trace/unavailable.exp68
2 files changed, 36 insertions, 37 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2f184bf..cea203b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2012-02-21 Pedro Alves <palves@redhat.com>
+ * gdb.trace/unavailable.exp (gdb_collect_globals_test): Use
+ with_test_prefix.
+
+2012-02-21 Pedro Alves <palves@redhat.com>
+
* gdb.arch/altivec-abi.exp (altivec_abi_tests): Don't do
with_test_prefix here.
(top level): Do it here instead. Remove `:' from the
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index 9130b4b..be79b86 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -496,49 +496,43 @@ proc gdb_collect_globals_test { } { with_test_prefix "collect globals" {
gdb_test_no_output "set print object on"
- global pf_prefix
- set old_pf_prefix $pf_prefix
- append pf_prefix " print object on:"
-
- # With print object on, printing a pointer may need to fetch the
- # pointed-to object, to check its run-time type. Make sure that
- # fails gracefully and transparently when the pointer itself is
- # unavailable.
- gdb_test "print virtualp" " = \\(Virtual \\*\\) <unavailable>"
-
- # no vtable pointer available
- gdb_test "print derived_unavail" \
- " = {<Middle> = <unavailable>, _vptr.Derived = <unavailable>, z = <unavailable>}"
-
- # vtable pointer available, but nothing else
- gdb_test "print derived_partial" \
- " = \\(Derived\\) {<Middle> = {<Base> = <unavailable>, _vptr.Middle = <unavailable>, y = <unavailable>}, _vptr.Derived = $hex, z = <unavailable>}"
-
- # whole object available
- gdb_test "print derived_whole" \
- " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex, z = 4}"
-
- set pf_prefix $old_pf_prefix
+ with_test_prefix "print object on" {
+ # With print object on, printing a pointer may need to fetch
+ # the pointed-to object, to check its run-time type. Make
+ # sure that fails gracefully and transparently when the
+ # pointer itself is unavailable.
+ gdb_test "print virtualp" " = \\(Virtual \\*\\) <unavailable>"
+
+ # no vtable pointer available
+ gdb_test "print derived_unavail" \
+ " = {<Middle> = <unavailable>, _vptr.Derived = <unavailable>, z = <unavailable>}"
+
+ # vtable pointer available, but nothing else
+ gdb_test "print derived_partial" \
+ " = \\(Derived\\) {<Middle> = {<Base> = <unavailable>, _vptr.Middle = <unavailable>, y = <unavailable>}, _vptr.Derived = $hex, z = <unavailable>}"
+
+ # whole object available
+ gdb_test "print derived_whole" \
+ " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex, z = 4}"
+ }
gdb_test_no_output "set print object off"
- append pf_prefix " print object off:"
-
- gdb_test "print virtualp" " = \\(Virtual \\*\\) <unavailable>"
+ with_test_prefix "print object off" {
+ gdb_test "print virtualp" " = \\(Virtual \\*\\) <unavailable>"
- # no vtable pointer available
- gdb_test "print derived_unavail" \
- " = {<Middle> = <unavailable>, _vptr.Derived = <unavailable>, z = <unavailable>}"
+ # no vtable pointer available
+ gdb_test "print derived_unavail" \
+ " = {<Middle> = <unavailable>, _vptr.Derived = <unavailable>, z = <unavailable>}"
- # vtable pointer available, but nothing else
- gdb_test "print derived_partial" \
- " = {<Middle> = {<Base> = <unavailable>, _vptr.Middle = <unavailable>, y = <unavailable>}, _vptr.Derived = $hex, z = <unavailable>}"
+ # vtable pointer available, but nothing else
+ gdb_test "print derived_partial" \
+ " = {<Middle> = {<Base> = <unavailable>, _vptr.Middle = <unavailable>, y = <unavailable>}, _vptr.Derived = $hex, z = <unavailable>}"
- # whole object available
- gdb_test "print derived_whole" \
- " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex, z = 4}"
-
- set pf_prefix $old_pf_prefix
+ # whole object available
+ gdb_test "print derived_whole" \
+ " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex, z = 4}"
+ }
# An instance of a virtual class where we collected everything but
# the vptr.