aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2012-09-11 09:03:08 +0000
committerAndrew Burgess <aburgess@broadcom.com>2012-09-11 09:03:08 +0000
commit350b1b266b54fe9cab76653b8b8c929884e78a23 (patch)
tree4eb949a64bfcfe8b3fb2d8a0a0d593acd297bc31 /gdb
parent5c7a0b3ee7ee9834e37fe8dca8495a828037906a (diff)
downloadgdb-350b1b266b54fe9cab76653b8b8c929884e78a23.zip
gdb-350b1b266b54fe9cab76653b8b8c929884e78a23.tar.gz
gdb-350b1b266b54fe9cab76653b8b8c929884e78a23.tar.bz2
http://sourceware.org/ml/gdb-patches/2012-09/msg00013.html
gdb/ChangeLog: * c-typeprint.c (c_type_print_varspec_prefix): Pass through the passed_a_ptr flag when displaying typedef types. gdb/testsuite/ChangeLog: * gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/c-typeprint.c2
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/ptype.exp2
4 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 01604a8..959ff33 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * c-typeprint.c (c_type_print_varspec_prefix): Pass through the
+ passed_a_ptr flag when displaying typedef types.
+
2012-09-10 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (coerce_unspec_val_to_type): Make sure that
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index c2a775a..b51ced8 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -306,7 +306,7 @@ c_type_print_varspec_prefix (struct type *type,
case TYPE_CODE_TYPEDEF:
c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
- stream, show, 0, 0);
+ stream, show, passed_a_ptr, 0);
break;
case TYPE_CODE_UNDEF:
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e9db80f..e67eea6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
+
2012-09-10 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/optim_drec: New testcase.
diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp
index c7bede2..d5f967c 100644
--- a/gdb/testsuite/gdb.base/ptype.exp
+++ b/gdb/testsuite/gdb.base/ptype.exp
@@ -370,6 +370,8 @@ if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
+gdb_test "ptype pv_char_array" "type = (|unsigned )char \\(\\*\\)\\\[0?\\\]"
+
#
##
## test ptype command with pointers