http://sourceware.org/ml/gdb-patches/2012-09/msg00013.html
authorAndrew Burgess <aburgess@broadcom.com>
Tue, 11 Sep 2012 09:03:08 +0000 (09:03 +0000)
committerAndrew Burgess <aburgess@broadcom.com>
Tue, 11 Sep 2012 09:03:08 +0000 (09:03 +0000)
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.

gdb/ChangeLog
gdb/c-typeprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/ptype.exp

index 01604a81c78ed14a793ab777721f94297fef5726..959ff334d3fef90ddb217c50d623196eb938ab8b 100644 (file)
@@ -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
index c2a775ac73f003dae7d319a47743eb21c7284ba8..b51ced88df3172df0c3f74fa1dce669e5b480739 100644 (file)
@@ -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:
index e9db80fb750ab02a257171bc152365c57d7835f8..e67eea6b81a537813bc7f23fce75911e8dc54b85 100644 (file)
@@ -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.
index c7bede212d6a7cafdea9acc9e9390127ca16121f..d5f967c2ca8231356a15beb89fc32efe663f7abc 100644 (file)
@@ -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