2001-12-10 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 11 Dec 2001 22:15:55 +0000 (22:15 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 11 Dec 2001 22:15:55 +0000 (22:15 +0000)
* arch-utils.c (generic_register_virtual_size): New function.
* arch-utils.h: Export generic version of register_virtual_size.
* gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default.
* gdbarch.c: Regenerate.

gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/gdbarch.c
gdb/gdbarch.sh

index 7a25a0dfc891328f7f5c5aa42d6515d2c0e22a6d..022766d0aae7406692f6c6a26a1e45feae0cc1c1 100644 (file)
        * symfile.c (simple_read_overlay_table): Ditto.
        (simple_read_overlay_region_table): Ditto.
 
+2001-12-10  Michael Snyder  <msnyder@redhat.com>
+
+       * arch-utils.c (generic_register_virtual_size): New function.
+       * arch-utils.h: Export generic version of register_virtual_size.
+       * gdbarch.sh (REGISTER_VIRTUAL_SIZE): Use new function as default.
+       * gdbarch.c: Regenerate.
+
 2001-12-09  Fred Fish  <fnf@redhat.com>
 
        * gdbtypes.c (TYPE_FLAG_UNSIGNED, TYPE_FLAG_STUB): Use
index 60c830160111d67a8784bf11c18d6fbeada6548d..6fac5ea7b483e6779b70d017ee210f3e7a54d6ea 100644 (file)
@@ -387,6 +387,14 @@ generic_register_raw_size (int regnum)
   return TARGET_INT_BIT / HOST_CHAR_BIT;
 }
 
+/* Assume the virtual size corresponds to the virtual type.  */
+
+int
+generic_register_virtual_size (int regnum)
+{
+  return REGISTER_VIRTUAL_TYPE (regnum);
+}
+
 \f
 /* Functions to manipulate the endianness of the target.  */
 
index d1b4226ee878b47d9c7d44af5868f112b9bb7bb8..834d3f1a459fd63d4f8d93d3f5bf5e9b01b225f2 100644 (file)
@@ -142,4 +142,8 @@ extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc
    of the integer type.  */
 extern int generic_register_raw_size (int regnum);
 
+/* Assume the virtual size of registers corresponds to the virtual type.  */
+
+extern int generic_register_virtual_size (int regnum);
+
 #endif
index 276d2e0ae20f15e195c46c6c55c3a32a6c6019cc..64cecbad4cf513d9bb4808013f505cd8432070a5 100644 (file)
@@ -314,7 +314,7 @@ struct gdbarch startup_gdbarch =
   0,
   generic_register_raw_size,
   0,
-  0,
+  generic_register_virtual_size,
   0,
   0,
   0,
index 02369b1f1ceceda8a40ea6333c5e6597acf17056..28395a864773da63bcf884bd19642060204227d2 100755 (executable)
@@ -429,7 +429,7 @@ v:2:REGISTER_BYTES:int:register_bytes::::0:-1
 f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0
 f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_raw_size:0
 v:2:MAX_REGISTER_RAW_SIZE:int:max_register_raw_size::::0:-1
-f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::0:0
+f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_virtual_size:0
 v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
 f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
 f:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs:::do_registers_info::0