aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-05-18 15:31:42 +0000
committerTom Tromey <tromey@redhat.com>2012-05-18 15:31:42 +0000
commit9cb709b6ba0111234528d4ead138d5b54fed6095 (patch)
treea7f5ace4300361d3c46c18e28cf185fc50e8db98 /gdb/testsuite/gdb.cp
parentb012acddd87cb89dc4b357adf458511232c58bfe (diff)
downloadfsf-binutils-gdb-9cb709b6ba0111234528d4ead138d5b54fed6095.zip
fsf-binutils-gdb-9cb709b6ba0111234528d4ead138d5b54fed6095.tar.gz
fsf-binutils-gdb-9cb709b6ba0111234528d4ead138d5b54fed6095.tar.bz2
PR exp/13907:
* valprint.h (struct value_print_options) <symbol_print>: New field. * valprint.c (user_print_options): Add default for symbol_print. (show_symbol_print): New function. (generic_val_print): Respect symbol_print. (_initialize_valprint): Add "print symbol" setting. * f-valprint.c (f_val_print): Respect symbol_print. * c-valprint.c (c_val_print): Respect symbol_print. * NEWS: Update. * printcmd.c (print_address_symbolic): Return int. Ignore some zero-size symbols. (print_address_demangle): Return int. * defs.h: (print_address_symbolic): Return int. * value.h (print_address_demangle): Return int. doc * gdb.texinfo (Print Settings): Document 'set print symbol'. testsuite * gdb.mi/mi-var-cmd.exp: Update. * gdb.objc/basicclass.exp (do_objc_tests): Update. * gdb.cp/virtbase.exp: Update. * gdb.cp/classes.exp (test_static_members): Update. * gdb.cp/casts.exp: Update. * gdb.base/pointers.exp: Update. * gdb.base/funcargs.exp (pointer_args): Update. (structs_by_reference): Update. * gdb.base/find.exp: Update. * gdb.base/call-strs.exp: Send "set print symbol off". * gdb.base/call-ar-st.exp: Update. * gdb.ada/fun_addr.exp: Update. * gdb.base/printcmds.exp (test_print_symbol): New proc. Call it. (test_print_repeats_10, test_print_strings) (test_print_char_arrays): Update.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/casts.exp4
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp4
-rw-r--r--gdb/testsuite/gdb.cp/virtbase.exp4
3 files changed, 6 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index 7272a29..ee499d7 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -141,7 +141,7 @@ gdb_test "print dynamic_cast<Alpha &> (derived)" \
"dynamic_cast simple upcast to reference"
gdb_test "print dynamic_cast<Derived *> (ad)" \
- " = \\(Derived \\*\\) $nonzero_hex" \
+ " = \\(Derived \\*\\) ${nonzero_hex}( <vtable for Derived.*>)?" \
"dynamic_cast simple downcast"
gdb_test "print dynamic_cast<VirtuallyDerived *> (add)" \
@@ -157,7 +157,7 @@ gdb_test "print dynamic_cast<VirtuallyDerived &> (*ad)" \
"dynamic_cast to reference to non-existing base"
gdb_test "print dynamic_cast<DoublyDerived *> (add)" \
- " = \\(DoublyDerived \\*\\) $nonzero_hex" \
+ " = \\(DoublyDerived \\*\\) ${nonzero_hex}( <vtable for DoublyDerived.*>)?" \
"dynamic_cast unique downcast"
gdb_test "print dynamic_cast<Gamma *> (add)" \
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index ae43630..36304b4 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -519,8 +519,8 @@ proc test_static_members {} {
gdb_test "print Foo::st" "\\$\[0-9\]+ = 100"
gdb_test_no_output "set foo.st = 200" ""
gdb_test "print bar.st" "\\$\[0-9\]+ = 200"
- gdb_test "print &foo.st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex"
- gdb_test "print &Bar::st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex"
+ gdb_test "print &foo.st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex <Foo::st>"
+ gdb_test "print &Bar::st" "\\$\[0-9\]+ = \\(int ?\\*\\) $hex <Foo::st>"
gdb_test "print *\$" "\\$\[0-9\]+ = 200"
gdb_test_no_output "set print static-members off"
diff --git a/gdb/testsuite/gdb.cp/virtbase.exp b/gdb/testsuite/gdb.cp/virtbase.exp
index 6bc0076..939830f 100644
--- a/gdb/testsuite/gdb.cp/virtbase.exp
+++ b/gdb/testsuite/gdb.cp/virtbase.exp
@@ -72,10 +72,10 @@ gdb_test "print rtti_data" " = .*, data = 1\}"
# value history to check the pointer value is not changed. If it had
# been changed, then we'd not be able to find the real type anymore.
gdb_test "print virtual_middle_b" \
- " = \\(Virtual \\*\\) $hex" \
+ " = \\(Virtual \\*\\) $hex <virtual_o>" \
"print pointer to virtual base at non-zero offset of larger object"
gdb_test "print $" \
- " = \\(Virtual \\*\\) $hex" \
+ " = \\(Virtual \\*\\) $hex <virtual_o>" \
"print same pointer from history value"
gdb_test "print *$$" \
" = \\(Virtual\\) {<VirtualMiddleA> = {<VirtualBase> = {_vptr.VirtualBase = ${hex}( <vtable for Virtual.*>)?, x = 0}, _vptr.VirtualMiddleA = ${hex}( <vtable for Virtual.*>)?, y = \\{0 <repeats 300 times>\\}}, <VirtualMiddleB> = {_vptr.VirtualMiddleB = ${hex}( <vtable for Virtual.*>)?, y = 0}, _vptr.Virtual = ${hex}( <vtable for Virtual.*>)?, z = 0}" \