aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-13 04:40:34 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-13 04:40:34 +0000
commit9c04cab7f16f8d8a042e5851f8743da434428b6d (patch)
treed5ae0003cf326a869b74fdc829e538197ee24ffe /gdb/gdbarch.c
parentb060cbeaa43c64be30227bb8d41b033ec5809871 (diff)
downloadgdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.zip
gdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.tar.gz
gdb-9c04cab7f16f8d8a042e5851f8743da434428b6d.tar.bz2
2003-06-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Update comments on registers, re-order. (deprecated_register_byte): Rename register_byte. (deprecated_register_raw_size): Rename register_raw_size. (deprecated_register_virtual_size): Rename register_virtual_size. (deprecated_register_virtual_type): Rename register_virtual_type. * gdbarch.h, gdbarch.c: Re-generate. * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. * vax-tdep.c (vax_gdbarch_init): Update. * v850-tdep.c (v850_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * sh-tdep.c (sh_gdbarch_init): Update. * s390-tdep.c (s390_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): Update. * ns32k-tdep.c: Update. * mn10300-tdep.c (mn10300_gdbarch_init): Update. * mips-tdep.c (mips_gdbarch_init): Update. * mcore-tdep.c (mcore_gdbarch_init): Update. * m68k-tdep.c (m68k_gdbarch_init): Update. * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. * ia64-tdep.c (ia64_gdbarch_init): Update. * hppa-tdep.c (hppa_gdbarch_init): Update. * h8300-tdep.c (h8300_gdbarch_init): Update. * frv-tdep.c (frv_gdbarch_init): Update. * cris-tdep.c (cris_gdbarch_init): Update. * avr-tdep.c (avr_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * arm-tdep.c (arm_gdbarch_init): Update.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c204
1 files changed, 102 insertions, 102 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9aa54af..03d6b99 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -168,14 +168,14 @@ struct gdbarch
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
int deprecated_register_size;
+ gdbarch_register_type_ftype *register_type;
+ gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
int deprecated_register_bytes;
- gdbarch_register_byte_ftype *register_byte;
- gdbarch_register_raw_size_ftype *register_raw_size;
+ gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
+ gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
+ gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
int deprecated_max_register_raw_size;
- gdbarch_register_virtual_size_ftype *register_virtual_size;
int deprecated_max_register_virtual_size;
- gdbarch_register_virtual_type_ftype *register_virtual_type;
- gdbarch_register_type_ftype *register_type;
gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
gdbarch_print_registers_info_ftype *print_registers_info;
gdbarch_print_float_info_ftype *print_float_info;
@@ -336,14 +336,14 @@ struct gdbarch startup_gdbarch =
0, /* dwarf2_reg_to_regnum */
0, /* register_name */
0, /* deprecated_register_size */
+ 0, /* register_type */
+ 0, /* deprecated_register_virtual_type */
0, /* deprecated_register_bytes */
- generic_register_byte, /* register_byte */
- generic_register_size, /* register_raw_size */
+ generic_register_byte, /* deprecated_register_byte */
+ generic_register_size, /* deprecated_register_raw_size */
+ generic_register_size, /* deprecated_register_virtual_size */
0, /* deprecated_max_register_raw_size */
- generic_register_size, /* register_virtual_size */
0, /* deprecated_max_register_virtual_size */
- 0, /* register_virtual_type */
- 0, /* register_type */
0, /* deprecated_do_registers_info */
default_print_registers_info, /* print_registers_info */
0, /* print_float_info */
@@ -518,9 +518,9 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->register_name = legacy_register_name;
- current_gdbarch->register_byte = generic_register_byte;
- current_gdbarch->register_raw_size = generic_register_size;
- current_gdbarch->register_virtual_size = generic_register_size;
+ current_gdbarch->deprecated_register_byte = generic_register_byte;
+ current_gdbarch->deprecated_register_raw_size = generic_register_size;
+ current_gdbarch->deprecated_register_virtual_size = generic_register_size;
current_gdbarch->print_registers_info = default_print_registers_info;
current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
@@ -644,13 +644,13 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
/* Skip verify of register_name, invalid_p == 0 */
- /* Skip verify of register_byte, has predicate */
- /* Skip verify of register_raw_size, invalid_p == 0 */
+ /* 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_max_register_raw_size, has predicate */
- /* Skip verify of register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_virtual_size, has predicate */
- /* Skip verify of register_virtual_type, has predicate */
- /* Skip verify of register_type, has predicate */
/* Skip verify of deprecated_do_registers_info, has predicate */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, has predicate */
@@ -2087,7 +2087,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
- (long) current_gdbarch->register_byte
+ (long) current_gdbarch->deprecated_register_byte
/*REGISTER_BYTE ()*/);
#endif
#ifdef REGISTER_BYTES_OK_P
@@ -2129,7 +2129,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_raw_size
+ (long) current_gdbarch->deprecated_register_raw_size
/*REGISTER_RAW_SIZE ()*/);
#endif
#ifdef REGISTER_SIM_REGNO
@@ -2173,7 +2173,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_size
+ (long) current_gdbarch->deprecated_register_virtual_size
/*REGISTER_VIRTUAL_SIZE ()*/);
#endif
#ifdef REGISTER_VIRTUAL_TYPE_P
@@ -2193,7 +2193,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_type
+ (long) current_gdbarch->deprecated_register_virtual_type
/*REGISTER_VIRTUAL_TYPE ()*/);
#endif
#ifdef REG_STRUCT_HAS_ADDR_P
@@ -3373,182 +3373,182 @@ set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
+gdbarch_register_type_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
+ return gdbarch->register_type != 0;
+}
+
+struct type *
+gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_type == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
- return gdbarch->deprecated_register_bytes;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
+ return gdbarch->register_type (gdbarch, reg_nr);
}
void
-set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
- int deprecated_register_bytes)
+set_gdbarch_register_type (struct gdbarch *gdbarch,
+ gdbarch_register_type_ftype register_type)
{
- gdbarch->deprecated_register_bytes = deprecated_register_bytes;
+ gdbarch->register_type = register_type;
}
int
-gdbarch_register_byte_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_byte != generic_register_byte;
+ return gdbarch->deprecated_register_virtual_type != 0;
}
-int
-gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
+struct type *
+gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_byte == 0)
+ if (gdbarch->deprecated_register_virtual_type == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_byte invalid");
- /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
+ "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
- return gdbarch->register_byte (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
+ return gdbarch->deprecated_register_virtual_type (reg_nr);
}
void
-set_gdbarch_register_byte (struct gdbarch *gdbarch,
- gdbarch_register_byte_ftype register_byte)
+set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
{
- gdbarch->register_byte = register_byte;
+ gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
}
int
-gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_raw_size == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
- return gdbarch->register_raw_size (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
+ return gdbarch->deprecated_register_bytes;
}
void
-set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
- gdbarch_register_raw_size_ftype register_raw_size)
+set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
+ int deprecated_register_bytes)
{
- gdbarch->register_raw_size = register_raw_size;
+ gdbarch->deprecated_register_bytes = deprecated_register_bytes;
}
int
-gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_raw_size != 0;
+ return gdbarch->deprecated_register_byte != generic_register_byte;
}
int
-gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_register_byte == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_register_byte invalid");
+ /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
- return gdbarch->deprecated_max_register_raw_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
+ return gdbarch->deprecated_register_byte (reg_nr);
}
void
-set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
- int deprecated_max_register_raw_size)
+set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
{
- gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
+ gdbarch->deprecated_register_byte = deprecated_register_byte;
}
int
-gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_size == 0)
+ if (gdbarch->deprecated_register_raw_size == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_size invalid");
+ "gdbarch: gdbarch_deprecated_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
- return gdbarch->register_virtual_size (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
+ return gdbarch->deprecated_register_raw_size (reg_nr);
}
void
-set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
- gdbarch_register_virtual_size_ftype register_virtual_size)
+set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
{
- gdbarch->register_virtual_size = register_virtual_size;
+ gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
}
int
-gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_virtual_size != 0;
-}
-
-int
-gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
+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");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
- return gdbarch->deprecated_max_register_virtual_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
+ return gdbarch->deprecated_register_virtual_size (reg_nr);
}
void
-set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
- int deprecated_max_register_virtual_size)
+set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
{
- gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
+ gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
}
int
-gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_virtual_type != 0;
+ return gdbarch->deprecated_max_register_raw_size != 0;
}
-struct type *
-gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
+int
+gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
- return gdbarch->register_virtual_type (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
+ return gdbarch->deprecated_max_register_raw_size;
}
void
-set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
- gdbarch_register_virtual_type_ftype register_virtual_type)
+set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_raw_size)
{
- gdbarch->register_virtual_type = register_virtual_type;
+ gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
}
int
-gdbarch_register_type_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_type != 0;
+ return gdbarch->deprecated_max_register_virtual_size != 0;
}
-struct type *
-gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
+int
+gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
- return gdbarch->register_type (gdbarch, reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
+ return gdbarch->deprecated_max_register_virtual_size;
}
void
-set_gdbarch_register_type (struct gdbarch *gdbarch,
- gdbarch_register_type_ftype register_type)
+set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_virtual_size)
{
- gdbarch->register_type = register_type;
+ gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
}
int