aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-07-03 14:34:29 +0000
committerAndrew Cagney <cagney@redhat.com>2003-07-03 14:34:29 +0000
commitdadd712e2163158cb9ae3a56099a4d36d78bcbc6 (patch)
tree87d2f90e06397191d1e016779e834d5940e064ac /gdb/gdbarch.c
parentab8c7bb13f6916e68cf5e83d4523890e1f9f95b7 (diff)
downloadgdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.zip
gdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.tar.gz
gdb-dadd712e2163158cb9ae3a56099a4d36d78bcbc6.tar.bz2
2003-07-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add predicate. * gdbarch.h, gdbarch.c: Re-generate. * regcache.c (init_regcache_descr): Use legacy code when either REGISTER_BYTE or REGISTER_RAW_SIZE is set.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 87585dd..966e373 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -641,8 +641,8 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of register_type, has predicate */
/* Skip verify of deprecated_register_virtual_type, has predicate */
/* Skip verify of deprecated_register_byte, has predicate */
- /* Skip verify of deprecated_register_raw_size, invalid_p == 0 */
- /* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
+ /* Skip verify of deprecated_register_raw_size, has predicate */
+ /* Skip verify of deprecated_register_virtual_size, has predicate */
/* Skip verify of deprecated_max_register_raw_size, has predicate */
/* Skip verify of deprecated_max_register_virtual_size, has predicate */
/* Skip verify of unwind_dummy_id, has predicate */
@@ -2147,6 +2147,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->register_name
/*REGISTER_NAME ()*/);
#endif
+#ifdef REGISTER_RAW_SIZE_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "REGISTER_RAW_SIZE_P()",
+ XSTRING (REGISTER_RAW_SIZE_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: REGISTER_RAW_SIZE_P() = %d\n",
+ REGISTER_RAW_SIZE_P ());
+#endif
#ifdef REGISTER_RAW_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2191,6 +2200,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: register_type = 0x%08lx\n",
(long) current_gdbarch->register_type);
+#ifdef REGISTER_VIRTUAL_SIZE_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "REGISTER_VIRTUAL_SIZE_P()",
+ XSTRING (REGISTER_VIRTUAL_SIZE_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: REGISTER_VIRTUAL_SIZE_P() = %d\n",
+ REGISTER_VIRTUAL_SIZE_P ());
+#endif
#ifdef REGISTER_VIRTUAL_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -3386,12 +3404,20 @@ set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
}
int
+gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_register_raw_size != generic_register_size;
+}
+
+int
gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->deprecated_register_raw_size == 0)
internal_error (__FILE__, __LINE__,
"gdbarch: gdbarch_deprecated_register_raw_size invalid");
+ /* Ignore predicate (gdbarch->deprecated_register_raw_size != generic_register_size). */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
return gdbarch->deprecated_register_raw_size (reg_nr);
@@ -3405,12 +3431,20 @@ set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
}
int
+gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_register_virtual_size != generic_register_size;
+}
+
+int
gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->deprecated_register_virtual_size == 0)
internal_error (__FILE__, __LINE__,
"gdbarch: gdbarch_deprecated_register_virtual_size invalid");
+ /* Ignore predicate (gdbarch->deprecated_register_virtual_size != generic_register_size). */
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
return gdbarch->deprecated_register_virtual_size (reg_nr);