aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorGeoffrey Noer <noer@cygnus>1996-12-05 00:36:45 +0000
committerGeoffrey Noer <noer@cygnus>1996-12-05 00:36:45 +0000
commit6823374b90da5efcbb009200a4cc006e26842feb (patch)
treefc7c337afabce5b20cc65c3fbc6cadce651230b2 /gdb
parentfa1e3be84c08373b9d1d546da2466cd1aa00a53b (diff)
downloadgdb-6823374b90da5efcbb009200a4cc006e26842feb.zip
gdb-6823374b90da5efcbb009200a4cc006e26842feb.tar.gz
gdb-6823374b90da5efcbb009200a4cc006e26842feb.tar.bz2
Wed Dec 4 16:34:05 1996 Geoffrey Noer <noer@cygnus.com>
* config/mn10300/mn10300.mt * config/mn10300/tm-mn10300.h: new config files for mn10300 processor
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog17
-rw-r--r--gdb/config/mn10300/mn10300.mt6
-rw-r--r--gdb/config/mn10300/tm-mn10300.h151
3 files changed, 174 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7bcc21e..e608fd2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,20 @@
+Wed Dec 4 16:34:05 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * config/mn10300/mn10300.mt
+ * config/mn10300/tm-mn10300.h: new config files for mn10300
+ processor
+
+Tue Dec 3 13:02:08 1996 Fred Fish <fnf@ninemoons.com>
+
+ * infptrace.c (store_inferior_registers): Move some common code out
+ to store_register, like fetch_inferior_registers & fetch_register.
+ (store_register): New function, from store_inferior_registers.
+ (fetch_inferior_registers, fetch_register): Minor code tweaks to
+ make {fetch,store}_inferior_registers and {fetch,store}_register
+ routines as similar in structure as possible.
+ (fetch_inferior_registers, store_inferior_registers): Eliminate
+ local variable numregs and just use ARCH_NUM_REGS directly.
+
Tue Dec 3 11:38:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
* blockframe.c: add macro USE_GENERIC_DUMMY_FRAMES to enable/disable
diff --git a/gdb/config/mn10300/mn10300.mt b/gdb/config/mn10300/mn10300.mt
new file mode 100644
index 0000000..f0f658a
--- /dev/null
+++ b/gdb/config/mn10300/mn10300.mt
@@ -0,0 +1,6 @@
+# Target: Matsushita mn10300
+TDEPFILES= mn10300-tdep.o
+TM_FILE= tm-mn10300.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/mn10300/libsim.a -lm
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
new file mode 100644
index 0000000..5b859bb
--- /dev/null
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -0,0 +1,151 @@
+/* Parameters for execution on a Matsushita mn10300 processor.
+ Copyright 1996
+ Free Software Foundation, Inc.
+
+ Contributed by Geoffrey Noer <noer@cygnus.com>
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+
+#define NUM_REGS 65
+
+#define REGISTER_NAMES \
+{ "r0", "r1", "r2", "sp", "gp", "r5", "r6", "r7", \
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
+ "r24", "r25", "r26", "r27", "r28", "fp", "ep", "r31", \
+ \
+ "eipc", "eipsw", "fepc", "fepsw", "ecr", "psw", "sr6", "sr7", \
+ "sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15", \
+ "sr16", "sr17", "sr18", "sr19", "sr20", "sr21", "sr22", "sr23", \
+ "sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31", \
+ "pc" }
+
+#define REGISTER_BYTES (NUM_REGS * 4)
+
+#define REGISTER_SIZE 4
+#define MAX_REGISTER_RAW_SIZE 4
+
+#define SP_REGNUM 3
+#define ARG0_REGNUM 6
+#define ARGLAST_REGNUM 9
+#define V0_REGNUM 10
+#define V1_REGNUM 11
+#define FP_REGNUM 29
+#define RP_REGNUM 31
+#define PS_REGNUM 37
+#define PC_REGNUM 64
+
+#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
+
+#define REGISTER_BYTE(REG) ((REG) * 4)
+#define REGISTER_VIRTUAL_SIZE(REG) 4
+#define REGISTER_RAW_SIZE(REG) 4
+
+#define MAX_REGISTER_VIRTUAL_SIZE 4
+
+#define BREAKPOINT {0xff, 0xff}
+
+#define FUNCTION_START_OFFSET 0
+
+#define DECR_PC_AFTER_BREAK 0
+
+#define INNER_THAN <
+
+#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
+
+#ifdef __STDC__
+struct frame_info;
+struct frame_saved_regs;
+struct type;
+struct value;
+#endif
+
+#define EXTRA_FRAME_INFO struct frame_saved_regs fsr;
+
+extern void mn10300_init_extra_frame_info PARAMS ((struct frame_info *fi));
+#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10300_init_extra_frame_info (fi)
+#define INIT_FRAME_PC /* Not necessary */
+
+extern void mn10300_frame_find_saved_regs PARAMS ((struct frame_info *fi, struct frame_saved_regs *regaddr));
+#define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
+
+extern CORE_ADDR mn10300_frame_chain PARAMS ((struct frame_info *fi));
+#define FRAME_CHAIN(fi) mn10300_frame_chain (fi)
+#define FRAME_CHAIN_VALID(FP, FI) generic_frame_chain_valid (FP, FI)
+
+extern CORE_ADDR mn10300_find_callers_reg PARAMS ((struct frame_info *fi, int regnum));
+extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
+#define FRAME_SAVED_PC(FI) (mn10300_frame_saved_pc (FI))
+
+#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+ memcpy (VALBUF, REGBUF + REGISTER_BYTE (V0_REGNUM), TYPE_LENGTH (TYPE))
+
+#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+ extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
+ REGISTER_RAW_SIZE (V0_REGNUM))
+
+#define STORE_RETURN_VALUE(TYPE, VALBUF) \
+ write_register_bytes(REGISTER_BYTE (V0_REGNUM), VALBUF, TYPE_LENGTH (TYPE));
+
+extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR pc));
+#define SKIP_PROLOGUE(pc) pc = mn10300_skip_prologue (pc)
+
+#define FRAME_ARGS_SKIP 0
+
+#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_NUM_ARGS(val, fi) ((val) = -1)
+
+extern void mn10300_pop_frame PARAMS ((struct frame_info *frame));
+#define POP_FRAME mn10300_pop_frame (get_current_frame ())
+
+#define CALL_DUMMY {0}
+#define CALL_DUMMY_START_OFFSET (0)
+#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
+#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
+#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
+#define CALL_DUMMY_ADDRESS() entry_point_address ()
+extern CORE_ADDR mn10300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
+#define PUSH_RETURN_ADDRESS(PC, SP) mn10300_push_return_address (PC, SP)
+
+
+#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
+
+extern CORE_ADDR
+mn10300_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
+ unsigned char struct_return,
+ CORE_ADDR struct_addr));
+#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+ (SP) = mn10300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
+
+#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP)
+
+
+#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
+
+#define USE_STRUCT_CONVENTION(GCC_P, TYPE) \
+ (TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 4)
+
+/* override the default get_saved_register function with
+ one that takes account of generic CALL_DUMMY frames */
+#define GET_SAVED_REGISTER
+
+/* Define this for Wingdb */
+
+#define TARGET_MN10300