aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/d10v
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-02-16 09:17:07 +0000
committerAndrew Cagney <cagney@redhat.com>1998-02-16 09:17:07 +0000
commit6c3beaaf2119ea40c4328aab81336357676e5341 (patch)
tree4f36d504a3f2108386a95b1c5a07d5ddf4aff66c /gdb/config/d10v
parent7aa6042f583282e1ee1a2624f9d938281f8f109d (diff)
downloadgdb-6c3beaaf2119ea40c4328aab81336357676e5341.zip
gdb-6c3beaaf2119ea40c4328aab81336357676e5341.tar.gz
gdb-6c3beaaf2119ea40c4328aab81336357676e5341.tar.bz2
Make ``target d10v'' and ``target remote'' equivalent.
Hack remote.c so that xfer_memory calls a memory translate function.
Diffstat (limited to 'gdb/config/d10v')
-rw-r--r--gdb/config/d10v/tm-d10v.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/config/d10v/tm-d10v.h b/gdb/config/d10v/tm-d10v.h
index 67136c9..93c634c 100644
--- a/gdb/config/d10v/tm-d10v.h
+++ b/gdb/config/d10v/tm-d10v.h
@@ -178,6 +178,17 @@ extern CORE_ADDR d10v_skip_prologue ();
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(extract_address ((REGBUF) + REGISTER_BYTE (ARG1_REGNUM), REGISTER_RAW_SIZE (ARG1_REGNUM)) | DMEM_START)
+
+/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
+ EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
+ and TYPE is the type (which is known to be struct, union or array).
+
+ The d10v returns anything less than 8 bytes in size in
+ registers. */
+
+#define USE_STRUCT_CONVENTION(gcc_p, type) \
+ (TYPE_LENGTH (type) > 1)
+
/* Define other aspects of the stack frame.
@@ -314,3 +325,13 @@ CORE_ADDR d10v_read_fp PARAMS ((void));
#define TARGET_PTR_BIT (4 * TARGET_CHAR_BIT)
#define TARGET_DOUBLE_BIT (4 * TARGET_CHAR_BIT)
#define TARGET_LONG_DOUBLE_BIT (8 * TARGET_CHAR_BIT)
+
+
+/* For the d10v when talking to the remote d10v board, GDB addresses
+ need to be translated into a format that the d10v rom monitor
+ understands. */
+
+int remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr));
+#define REMOTE_TRANSLATE_XFER_ADDRESS(GDB_ADDR, GDB_LEN, REM_ADDR, REM_LEN) \
+(REM_LEN) = remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), &(REM_ADDR))
+