This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gdbtypes.c: add names to vector types


This patch adds names to the vector types.
W/o these, the maint print registers command cannot print the
type of a vector register. Now it prints: 

(gdb) maint print registers
 Name         Nr  Rel Offset    Size  Type                
 r0            0    0      0       4  int32_t             
 r1            1    1      4       4  int32_t             
 r2            2    2      8       4  int32_t             
 r3            3    3     12       4  int32_t             
 r4            4    4     16       4  int32_t             
 r5            5    5     20       4  int32_t             
 r6            6    6     24       4  int32_t             
 r7            7    7     28       4  int32_t             
 r8            8    8     32       4  int32_t             
 r9            9    9     36       4  int32_t             
 r10          10   10     40       4  int32_t             
[....]
 fpscr        70   70    408       4  int32_t             
 vr0          71   71    412      16  _vec128             
 vr1          72   72    428      16  _vec128             
 vr2          73   73    444      16  _vec128             
 vr3          74   74    460      16  _vec128             
 vr4          75   75    476      16  _vec128             
[....]

Elena

2002-08-20  Elena Zannoni  <ezannoni@redhat.com>

	* gdbtypes.c (build_builtin_type_vec64): Add name to type.
	(build_builtin_type_vec64i): Ditto.
	(build_builtin_type_vec128): Ditto.
	(build_builtin_type_vec128i): Ditto.

Index: gdbtypes.c
===================================================================
RCS file: /cvs/uberbaum/gdb/gdbtypes.c,v
retrieving revision 1.55
diff -u -r1.55 gdbtypes.c
--- gdbtypes.c  10 Aug 2002 05:12:40 -0000      1.55
+++ gdbtypes.c  20 Aug 2002 19:24:46 -0000
@@ -846,6 +846,7 @@
   append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
 
   TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec64";
   return t;
 }
 
@@ -873,6 +874,7 @@
   append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
 
   TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec64i";
   return t;
 }
 
@@ -902,6 +904,7 @@
   append_composite_type_field (t, "v16_int8", builtin_type_v16_int8);
 
   TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec128";
   return t;
 }
 
@@ -921,6 +924,7 @@
   append_composite_type_field (t, "uint128", builtin_type_int128);
 
   TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec128i";
   return t;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]