diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/config/mn10300/tm-mn10300.h | 37 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 144 |
3 files changed, 161 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3cddbd2..bf5ea17 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 9 00:14:49 1996 Geoffrey Noer <noer@cygnus.com> + + * config/mn10300/tm-mn10300.h: fix register names + * mn10300-tdep.c: new skeleton tdep for mn10300 + Sun Dec 8 18:02:57 1996 Doug Evans <dje@canuck.cygnus.com> * remote-sim.h: Update some comments. diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h index 5b859bb..846483d 100644 --- a/gdb/config/mn10300/tm-mn10300.h +++ b/gdb/config/mn10300/tm-mn10300.h @@ -22,34 +22,23 @@ 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 NUM_REGS 14 + +#define REGISTER_NAMES \ +{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3", \ + "sp", "pc", "mdr", "psw", "lir", "lar"} + +#define SP_REGNUM 8 +#define PC_REGNUM 9 +#define MDR_REGNUM 10 +#define PSW_REGNUM 11 +#define LIR_REGNUM 12 +#define LAR_REGNUM 13 #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int @@ -124,7 +113,6 @@ extern void mn10300_pop_frame PARAMS ((struct frame_info *frame)); 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 @@ -136,7 +124,6 @@ mn10300_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp, #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) \ diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c new file mode 100644 index 0000000..6fb0be8 --- /dev/null +++ b/gdb/mn10300-tdep.c @@ -0,0 +1,144 @@ +/* Target-dependent code for the NEC MN10300 for GDB, the GNU debugger. + Copyright 1996, Free Software Foundation, Inc. + +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. */ + +/* Contributed by Geoffrey Noer, noer@cygnus.com */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "obstack.h" +#include "target.h" +#include "value.h" +#include "bfd.h" +#include "gdb_string.h" +#include "gdbcore.h" +#include "symfile.h" + +/* Info gleaned from scanning a function's prologue. */ + +struct pifsr /* Info about one saved reg */ +{ + int framereg; /* Frame reg (SP or FP) */ + int offset; /* Offset from framereg */ + int reg; /* Saved register number */ +}; + +struct prologue_info +{ + int framereg; + int frameoffset; + int start_function; + struct pifsr *pifsrs; +}; + +static CORE_ADDR +mn10300_scan_prologue (pc, pi) + CORE_ADDR pc; + struct prologue_info *pi; +{ +} + +void +mn10300_init_extra_frame_info (fi) + struct frame_info *fi; +{ +} + +CORE_ADDR +mn10300_frame_chain (fi) + struct frame_info *fi; +{ +} + +CORE_ADDR +mn10300_find_callers_reg (fi, regnum) + struct frame_info *fi; + int regnum; +{ +} + +CORE_ADDR +mn10300_skip_prologue (pc) + CORE_ADDR pc; +{ +} + +/* Function: pop_frame + This routine gets called when either the user uses the `return' + command, or the call dummy breakpoint gets hit. */ + +void +mn10300_pop_frame (frame) + struct frame_info *frame; +{ +} + +CORE_ADDR +mn10300_push_arguments (nargs, args, sp, struct_return, struct_addr) + int nargs; + value_ptr *args; + CORE_ADDR sp; + unsigned char struct_return; + CORE_ADDR struct_addr; +{ +} + +CORE_ADDR +mn10300_push_return_address (pc, sp) + CORE_ADDR pc; + CORE_ADDR sp; +{ +} + +CORE_ADDR +mn10300_frame_saved_pc (fi) + struct frame_info *fi; +{ +} + +void +get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) + char *raw_buffer; + int *optimized; + CORE_ADDR *addrp; + struct frame_info *frame; + int regnum; + enum lval_type *lval; +{ + generic_get_saved_register (raw_buffer, optimized, addrp, + frame, regnum, lval); +} + +int +mn10300_fix_call_dummy (dummy, sp, fun, nargs, args, type, gcc_p) + char *dummy; + CORE_ADDR sp; + CORE_ADDR fun; + int nargs; + value_ptr *args; + struct type *type; + int gcc_p; +{ +} + +void +_initialize_mn10300_tdep () +{ + tm_print_insn = print_insn_mn10300; +} |