aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-04-09 17:43:26 +0000
committerJeff Law <law@redhat.com>1997-04-09 17:43:26 +0000
commitfc8d57c2dc87d5bf307a6bfb52af755f1fa65e32 (patch)
tree7c8b442eac91038ec52b106512c458da988bd022 /gdb
parent47332446f581c91935bafffca8924bff6898919b (diff)
downloadgdb-fc8d57c2dc87d5bf307a6bfb52af755f1fa65e32.zip
gdb-fc8d57c2dc87d5bf307a6bfb52af755f1fa65e32.tar.gz
gdb-fc8d57c2dc87d5bf307a6bfb52af755f1fa65e32.tar.bz2
* mn10300-tdep.c: Almost completely rewritten based on mn10200
port. * config/mn10300/tm-mn10300.h: Likewise. === gdb Summary === # of expected passes 3890 # of unexpected failures 8 # of expected failures 39 # of unresolved testcases 1
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/config/mn10300/tm-mn10300.h53
2 files changed, 38 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d683dc3..1dfa21f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+Wed Apr 9 11:36:14 1997 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300-tdep.c: Almost completely rewritten based on mn10200
+ port.
+ * config/mn10300/tm-mn10300.h: Likewise.
+
Tue Apr 8 10:45:24 1997 Stu Grossman (grossman@critters.cygnus.com)
* config/pa/{hppabsd.mt hppahpux.mt hppaosf.mt}: Remove
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
index 65203af..4b759ca 100644
--- a/gdb/config/mn10300/tm-mn10300.h
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -19,12 +19,22 @@ 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. */
+/* The mn10300 is little endian. */
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+/* All registers are 32bits (phew!). */
#define REGISTER_SIZE 4
#define MAX_REGISTER_RAW_SIZE 4
#define NUM_REGS 14
+#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 REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
#define REGISTER_NAMES \
@@ -40,14 +50,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define FP_REGNUM 7
-#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
+/* The breakpoint instruction must be the same size as the smallest
+ instruction in the instruction set.
+ The Matsushita mn10x00 processors have single byte instructions
+ so we need a single byte breakpoint. Matsushita hasn't defined
+ one, so we defined it ourselves. */
#define BREAKPOINT {0xff}
#define FUNCTION_START_OFFSET 0
@@ -66,20 +74,21 @@ struct type;
struct value;
#endif
-#define EXTRA_FRAME_INFO struct frame_saved_regs fsr;
+#define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
-extern void mn10300_init_extra_frame_info PARAMS ((struct frame_info *fi));
+extern void mn10300_init_extra_frame_info PARAMS ((struct frame_info *));
#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));
+extern void mn10300_frame_find_saved_regs PARAMS ((struct frame_info *,
+ struct frame_saved_regs *));
#define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
-extern CORE_ADDR mn10300_frame_chain PARAMS ((struct frame_info *fi));
+extern CORE_ADDR mn10300_frame_chain PARAMS ((struct frame_info *));
#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_find_callers_reg PARAMS ((struct frame_info *, int));
extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
#define FRAME_SAVED_PC(FI) (mn10300_frame_saved_pc (FI))
@@ -97,7 +106,10 @@ extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
#define STORE_RETURN_VALUE(TYPE, VALBUF) \
write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE));
-extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR pc));
+#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
+ (SP) = mn10300_store_struct_return (STRUCT_ADDR, SP)
+
+extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR));
#define SKIP_PROLOGUE(pc) pc = mn10300_skip_prologue (pc)
#define FRAME_ARGS_SKIP 0
@@ -106,12 +118,11 @@ extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR pc));
#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));
+extern void mn10300_pop_frame PARAMS ((struct frame_info *));
#define POP_FRAME mn10300_pop_frame (get_current_frame ())
#define USE_GENERIC_DUMMY_FRAMES
#define CALL_DUMMY {0}
-#undef CALL_DUMMY /* for now, no function calls */
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
@@ -124,18 +135,18 @@ extern CORE_ADDR mn10300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
#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));
+mn10300_push_arguments PARAMS ((int, struct value **, CORE_ADDR,
+ unsigned char, CORE_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 REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
+ (TYPE_LENGTH (TYPE) > 8)
+
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) \
- (TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 4)
+ (TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 8)
/* override the default get_saved_register function with
one that takes account of generic CALL_DUMMY frames */