aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-04-17 02:27:37 +0000
committerAndrew Cagney <cagney@redhat.com>2000-04-17 02:27:37 +0000
commitbc1821e659134bd92db6c633bb853b4582f982a2 (patch)
tree1fde39944b2141112bffada6ccd581f6248e91bd /gdb/gdbarch.c
parent0ce865f26fcb424b6202a701040973cc1fdde62a (diff)
downloadgdb-bc1821e659134bd92db6c633bb853b4582f982a2.zip
gdb-bc1821e659134bd92db6c633bb853b4582f982a2.tar.gz
gdb-bc1821e659134bd92db6c633bb853b4582f982a2.tar.bz2
* remote.c (REMOTE_TRANSLATE_XFER_ADDRESS), mem-break.c
(MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT), target.h (BREAKPOINT_FROM_PC), valops.c (COERCE_FLOAT_TO_DOUBLE), gdbarch.sh (D10V_MAKE_DADDR, D10V_MAKE_IADDR, FRAMELESS_FUNCTION_INVOCATION, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, REGISTER_NAME), findvar.c (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Delete default definition. Handled by gdbarch. * gdbarch.sh: Make multi-arch defaults, defaults for non- multi-arch targets. (REGISTER_NAME, COERCE_FLOAT_TO_DOUBLE, REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, D10V_MAKE_DADDR, D10V_MAKE_IADDR, BREAKPOINT_FROM_PC, MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT, REMOTE_TRANSLATE_XFER_ADDRESS, FRAMELESS_FUNCTION_INVOCATION): Provide default/legacy implementation. (REGISTER_NAMES, CALL_DUMMY): Allow legacy definition. * gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 6b58760..ed05584 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1316,6 +1316,8 @@ set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
char *
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
+ if (GDB_MULTI_ARCH == 0)
+ return legacy_register_name (regnr);
if (gdbarch->register_name == 0)
internal_error ("gdbarch: gdbarch_register_name invalid");
if (gdbarch_debug >= 2)
@@ -1735,6 +1737,8 @@ set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
int
gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
{
+ if (GDB_MULTI_ARCH == 0)
+ return default_coerce_float_to_double (formal, actual);
if (gdbarch->coerce_float_to_double == 0)
internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
if (gdbarch_debug >= 2)
@@ -1769,6 +1773,8 @@ set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
int
gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
{
+ if (GDB_MULTI_ARCH == 0)
+ return generic_register_convertible_not (nr);
if (gdbarch->register_convertible == 0)
internal_error ("gdbarch: gdbarch_register_convertible invalid");
if (gdbarch_debug >= 2)
@@ -1820,6 +1826,8 @@ set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
CORE_ADDR
gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, char *buf)
{
+ if (GDB_MULTI_ARCH == 0)
+ return generic_pointer_to_address (type, buf);
if (gdbarch->pointer_to_address == 0)
internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
if (gdbarch_debug >= 2)
@@ -1837,6 +1845,11 @@ set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
void
gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, char *buf, CORE_ADDR addr)
{
+ if (GDB_MULTI_ARCH == 0)
+ {
+ generic_address_to_pointer (type, buf, addr);
+ return;
+ }
if (gdbarch->address_to_pointer == 0)
internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
if (gdbarch_debug >= 2)
@@ -2177,6 +2190,8 @@ set_gdbarch_inner_than (struct gdbarch *gdbarch,
unsigned char *
gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
{
+ if (GDB_MULTI_ARCH == 0)
+ return legacy_breakpoint_from_pc (pcptr, lenptr);
if (gdbarch->breakpoint_from_pc == 0)
internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
if (gdbarch_debug >= 2)
@@ -2194,6 +2209,8 @@ set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
int
gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
+ if (GDB_MULTI_ARCH == 0)
+ return default_memory_insert_breakpoint (addr, contents_cache);
if (gdbarch->memory_insert_breakpoint == 0)
internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
if (gdbarch_debug >= 2)
@@ -2211,6 +2228,8 @@ set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
int
gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
+ if (GDB_MULTI_ARCH == 0)
+ return default_memory_remove_breakpoint (addr, contents_cache);
if (gdbarch->memory_remove_breakpoint == 0)
internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
if (gdbarch_debug >= 2)
@@ -2262,6 +2281,11 @@ set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
void
gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
{
+ if (GDB_MULTI_ARCH == 0)
+ {
+ generic_remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
+ return;
+ }
if (gdbarch->remote_translate_xfer_address == 0)
internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
if (gdbarch_debug >= 2)
@@ -2296,6 +2320,8 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
int
gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
{
+ if (GDB_MULTI_ARCH == 0)
+ return generic_frameless_function_invocation_not (fi);
if (gdbarch->frameless_function_invocation == 0)
internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
if (gdbarch_debug >= 2)