From a1f6a07c3d1d3a34d36d4e49f0fd3c66554e41b2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Mar 2020 17:39:52 -0600 Subject: 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 * c-valprint.c (c_value_print): Use common_val_print. gdb/testsuite/ChangeLog 2020-03-13 Tom Tromey * gdb.base/printcmds.exp (test_print_strings): Add regression test. * gdb.base/printcmds.c (charptr): New typedef. (teststring2): New global. --- gdb/testsuite/gdb.base/printcmds.exp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/testsuite/gdb.base/printcmds.exp') 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 -- cgit v1.1