aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/printcmds.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-03-13 17:39:52 -0600
committerTom Tromey <tom@tromey.com>2020-03-13 18:03:39 -0600
commita1f6a07c3d1d3a34d36d4e49f0fd3c66554e41b2 (patch)
tree0903e61b62d8cfc09a77c4198f21672fa577d2d2 /gdb/testsuite/gdb.base/printcmds.exp
parent410cf315014145f169c146442e9c28163d9ae10a (diff)
downloadgdb-a1f6a07c3d1d3a34d36d4e49f0fd3c66554e41b2.zip
gdb-a1f6a07c3d1d3a34d36d4e49f0fd3c66554e41b2.tar.gz
gdb-a1f6a07c3d1d3a34d36d4e49f0fd3c66554e41b2.tar.bz2
Use common_val_print in c-valprint.c
This changes c_value_print to call common_val_print. This is more complicated than the usual sort of common_val_print change, due to the handling of RTTI. gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * c-valprint.c (c_value_print): Use common_val_print. gdb/testsuite/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * gdb.base/printcmds.exp (test_print_strings): Add regression test. * gdb.base/printcmds.c (charptr): New typedef. (teststring2): New global.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.exp')
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index c87a151..2c8baad 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -519,6 +519,9 @@ proc test_print_strings {} {
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with elements set to 20"
+ gdb_test "print teststring2" \
+ " = (charptr) \"more contents\""
+
gdb_test_no_output "set print elements 8"
# Set the target-charset to ASCII, because the output varies from