aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/arch-utils.c8
-rw-r--r--gdb/arch-utils.h4
-rw-r--r--gdb/gdbarch.c2
-rwxr-xr-xgdb/gdbarch.sh2
5 files changed, 21 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7a25a0d..022766d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -23,6 +23,13 @@
* 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
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 60c8301..6fac5ea 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -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);
+}
+
/* Functions to manipulate the endianness of the target. */
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index d1b4226..834d3f1 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -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
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 276d2e0..64cecba 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -314,7 +314,7 @@ struct gdbarch startup_gdbarch =
0,
generic_register_raw_size,
0,
- 0,
+ generic_register_virtual_size,
0,
0,
0,
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 02369b1..28395a8 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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