aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/m68k/tm-linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config/m68k/tm-linux.h')
-rw-r--r--gdb/config/m68k/tm-linux.h55
1 files changed, 12 insertions, 43 deletions
diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h
index cc20c62..b11c418 100644
--- a/gdb/config/m68k/tm-linux.h
+++ b/gdb/config/m68k/tm-linux.h
@@ -1,6 +1,6 @@
/* Definitions to target GDB to GNU/Linux on m680x0.
- Copyright 1996, 1998, 1999, 2000, 2002 Free Software Foundation,
+ Copyright 1996, 1998, 1999, 2000, 2002, 2003 Free Software Foundation,
Inc.
This file is part of GDB.
@@ -20,8 +20,10 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include "config/tm-linux.h"
+#include "m68k/tm-m68k.h"
+
#include "regcache.h"
-#include "m68k-tdep.h"
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
@@ -37,56 +39,24 @@
function return value of type TYPE, and copy that, in virtual
format, into VALBUF. */
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-{ \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- { \
- REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
- ((char *) (REGBUF) \
- + REGISTER_BYTE (FP0_REGNUM)), \
- VALBUF); \
- } \
- else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- memcpy (VALBUF, (char *) (REGBUF) + REGISTER_BYTE (M68K_A0_REGNUM), \
- TYPE_LENGTH (TYPE)); \
- else \
- memcpy (VALBUF, \
- ((char *) (REGBUF) \
- + (TYPE_LENGTH (TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH (TYPE))), \
- TYPE_LENGTH (TYPE)); \
-}
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+ m68k_linux_extract_return_value (TYPE, REGBUF, VALBUF)
+extern void m68k_linux_extract_return_value (struct type *, char *, char *);
/* Write into appropriate registers a function return value of type
TYPE, given in virtual format. */
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-{ \
- if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- { \
- char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
- REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buffer); \
- deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
- raw_buffer, TYPE_LENGTH (TYPE)); \
- } \
- else \
- { \
- if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- deprecated_write_register_bytes (REGISTER_BYTE (M68K_A0_REGNUM), VALBUF, \
- TYPE_LENGTH (TYPE)); \
- deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); \
- } \
-}
-
-#include "config/tm-linux.h"
-#include "m68k/tm-m68k.h"
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
+ m68k_linux_store_return_value (TYPE, VALBUF)
+extern void m68k_linux_store_return_value (struct type *, char *);
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- (*(CORE_ADDR *)((char *) (REGBUF) + REGISTER_BYTE (M68K_A0_REGNUM)))
+ m68k_linux_extract_struct_value_address (REGBUF)
+extern CORE_ADDR m68k_linux_extract_struct_value_address (char *);
/* Offsets (in target ints) into jmp_buf. */
@@ -100,7 +70,6 @@
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-#undef DEPRECATED_FRAME_SAVED_PC
#define DEPRECATED_FRAME_SAVED_PC(frame) m68k_linux_frame_saved_pc (frame)
extern CORE_ADDR m68k_linux_frame_saved_pc (struct frame_info *);