summaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/d10v/tm-d10v.h10
-rw-r--r--gdb/config/mips/tm-mips.h6
-rw-r--r--gdb/config/mn10300/tm-mn10300.h30
3 files changed, 25 insertions, 21 deletions
diff --git a/gdb/config/d10v/tm-d10v.h b/gdb/config/d10v/tm-d10v.h
index 99fd9ac41b9..8dfa9fd3d17 100644
--- a/gdb/config/d10v/tm-d10v.h
+++ b/gdb/config/d10v/tm-d10v.h
@@ -19,11 +19,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Contributed by Martin Hunt, hunt@cygnus.com */
+#define GDB_MULTI_ARCH 1
/* #define GDB_TARGET_IS_D10V - moved to gdbarch.h */
/* Define the bit, byte, and word ordering of the machine. */
+#if !GDB_MULTI_ARCH
+
#define TARGET_BYTE_ORDER BIG_ENDIAN
/* Offset from address of function to start of its code.
@@ -53,6 +56,8 @@ extern char *d10v_register_name PARAMS ((int reg_nr));
#define NUM_REGS 37
+#endif /* GDB_MULTI_ARCH */
+
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
@@ -64,15 +69,19 @@ extern char *d10v_register_name PARAMS ((int reg_nr));
#define R0_REGNUM 0
#define LR_REGNUM 13
+#if !GDB_MULTI_ARCH
#define SP_REGNUM 15
#define FP_REGNUM 11
#define PC_REGNUM 18
+#endif
#define PSW_REGNUM 16
#define IMAP0_REGNUM 32
#define IMAP1_REGNUM 33
#define DMAP_REGNUM 34
#define A0_REGNUM 35
+#if !GDB_MULTI_ARCH
+
/* ??? */
#define REGISTER_SIZE 2
@@ -298,3 +307,4 @@ extern void remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int
#define REMOTE_TRANSLATE_XFER_ADDRESS(GDB_ADDR, GDB_LEN, REM_ADDR, REM_LEN) \
remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), (REM_ADDR), (REM_LEN))
+#endif
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index e2e5099df6b..99a54498727 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -386,10 +386,12 @@ extern void mips_find_saved_regs PARAMS ((struct frame_info *));
function calls. We don't need STACK_ALIGN, PUSH_ARGUMENTS will
handle it. */
+extern CORE_ADDR mips_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
(mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
-extern CORE_ADDR
-mips_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
+
+extern CORE_ADDR mips_push_return_address PARAMS ((CORE_ADDR pc, CORE_ADDR sp));
+#define PUSH_RETURN_ADDRESS(PC, SP) (mips_push_return_address ((PC), (SP)))
/* Push an empty stack frame, to record the current PC, etc. */
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
index ae5f0aa2e5b..eb47fecf218 100644
--- a/gdb/config/mn10300/tm-mn10300.h
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -37,8 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
-extern char **mn10300_register_names;
-#define REGISTER_NAME(i) mn10300_register_names[i]
+extern char *mn10300_register_name PARAMS ((int regnr));
+#define REGISTER_NAME(i) (mn10300_register_name (i))
#define D2_REGNUM 2
#define D3_REGNUM 3
@@ -65,8 +65,9 @@ extern breakpoint_from_pc_fn mn10300_breakpoint_from_pc;
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+extern CORE_ADDR mn10300_saved_pc_after_call PARAMS ((struct frame_info *frame));
#define SAVED_PC_AFTER_CALL(frame) \
- read_memory_integer (read_register (SP_REGNUM), 4)
+ mn10300_saved_pc_after_call (frame)
#ifdef __STDC__
struct frame_info;
@@ -92,25 +93,20 @@ extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
+extern void mn10300_extract_return_value PARAMS ((struct type *type, char *regbuf, char *valbuf));
#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \
- else \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE));
-
+ mn10300_extract_return_value (TYPE, REGBUF, VALBUF)
+CORE_ADDR mn10300_extract_struct_value_address PARAMS ((char *regbuf));
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- extract_address (REGBUF + REGISTER_BYTE (4), \
- REGISTER_RAW_SIZE (4))
+ mn10300_extract_struct_value_address (REGBUF)
+void mn10300_store_return_value PARAMS ((struct type *type, char *valbuf));
#define STORE_RETURN_VALUE(TYPE, VALBUF) \
- if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- write_register_bytes(REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
- else \
- write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE));
+ mn10300_store_return_value (TYPE, VALBUF)
#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
- (SP) = mn10300_store_struct_return (STRUCT_ADDR, SP)
+ (mn10300_store_struct_return (STRUCT_ADDR, SP))
extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
#define SKIP_PROLOGUE(pc) (mn10300_skip_prologue (pc))
@@ -160,7 +156,3 @@ extern use_struct_convention_fn mn10300_use_struct_convention;
extern void mn10300_virtual_frame_pointer PARAMS ((CORE_ADDR, long *, long *));
#define TARGET_VIRTUAL_FRAME_POINTER(PC, REGP, OFFP) \
mn10300_virtual_frame_pointer ((PC), (REGP), (OFFP))
-
-/* Define this for Wingdb */
-
-#define TARGET_MN10300