diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-05-25 18:09:09 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-05-25 18:09:09 +0000 |
commit | 392a587b0562bfd8561bc15ad2625a4f49f461f0 (patch) | |
tree | 933e0970b7845c901c7ea3e128fa9cb0dcf9fe14 /gdb/config/sh | |
parent | 751d21b5b946a4a451552fbac692b14abea3d816 (diff) | |
download | gdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.zip gdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.gz gdb-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.bz2 |
import gdb-1999-05-25 snapshot
Diffstat (limited to 'gdb/config/sh')
-rw-r--r-- | gdb/config/sh/tm-sh.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h index 2d5f8bd..3552300 100644 --- a/gdb/config/sh/tm-sh.h +++ b/gdb/config/sh/tm-sh.h @@ -46,11 +46,10 @@ struct type; extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR)); #define SKIP_PROLOGUE(ip) (sh_skip_prologue (ip)) - /* Immediately after a function call, return the saved pc. Can't always go through the frames for this because on some machines the new frame is not set up until the new function executes - some instructions. + some instructions. The return address is the value saved in the PR register + 4 */ @@ -63,7 +62,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR)); /* Illegal instruction - used by the simulator for breakpoint detection */ -#define BREAKPOINT {0xc3, 0xc3} /* 0xc3c3 is trapa #c3, and it works in big +#define BREAKPOINT {0xc3, 0xc3} /* 0xc3c3 is trapa #c3, and it works in big and little endian modes */ #define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } @@ -77,7 +76,7 @@ extern CORE_ADDR sh_skip_prologue PARAMS ((CORE_ADDR)); #define REGISTER_TYPE long /* Say how much memory is needed to store a copy of the register set */ -#define REGISTER_BYTES (NUM_REGS*4) +#define REGISTER_BYTES (NUM_REGS*4) /* Index within `registers' of the first byte of the space for register N. */ @@ -147,7 +146,7 @@ extern char **sh_register_names; #define NUM_REALREGS 59 /* Store the address of the place in which to copy the structure the - subroutine will return. This is called from call_function. + subroutine will return. This is called from call_function. We store structs through a pointer passed in R0 */ @@ -166,7 +165,7 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *)); sh_extract_return_value (TYPE, REGBUF, VALBUF) /* Write into appropriate registers a function return value - of type TYPE, given in virtual format. + of type TYPE, given in virtual format. Things always get returned in R0/R1 */ @@ -181,25 +180,25 @@ extern void sh_extract_return_value PARAMS ((struct type *, void *, void *)); extract_address (REGBUF, REGISTER_RAW_SIZE (0)) -/* Define other aspects of the stack frame. +/* Define other aspects of the stack frame. we keep a copy of the worked out return pc lying around, since it is a useful bit of info */ #define EXTRA_FRAME_INFO \ CORE_ADDR return_pc; \ int leaf_function; \ - int f_offset; + int f_offset; #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ - sh_init_extra_frame_info(fromleaf, fi) + sh_init_extra_frame_info(fromleaf, fi) extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *)); /* A macro that tells us whether the function invocation represented by FI does not have a frame on the stack associated with it. If it does not, FRAMELESS is set to 1, else 0. */ -#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \ - (FRAMELESS) = frameless_look_for_prologue(FI) +#define FRAMELESS_FUNCTION_INVOCATION(FI) \ + (frameless_look_for_prologue(FI)) #define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc) #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) @@ -210,13 +209,13 @@ extern void sh_init_extra_frame_info PARAMS ((int, struct frame_info *)); /* We can't tell how many args there are */ -#define FRAME_NUM_ARGS(val,fi) (val = -1) +#define FRAME_NUM_ARGS(fi) (-1) /* Return number of bytes at start of arglist that are not really args. */ #define FRAME_ARGS_SKIP 0 -extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi, +extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi, struct frame_saved_regs *fsr)); /* Put here the code to store, into a struct frame_saved_regs, @@ -232,8 +231,8 @@ extern void sh_frame_find_saved_regs PARAMS ((struct frame_info *fi, typedef unsigned short INSN_WORD; -extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, - struct value **args, +extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, + struct value **args, CORE_ADDR sp, unsigned char struct_return, CORE_ADDR struct_addr)); @@ -243,7 +242,7 @@ extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, #define CALL_DUMMY_LENGTH (0) #define CALL_DUMMY_START_OFFSET (0) #define CALL_DUMMY_BREAKPOINT_OFFSET (0) -#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) +#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) #define CALL_DUMMY_LOCATION AT_ENTRY_POINT #define CALL_DUMMY_ADDRESS() entry_point_address () extern CORE_ADDR sh_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR)); @@ -256,9 +255,9 @@ extern CORE_ADDR sh_frame_chain PARAMS ((struct frame_info *)); #define FRAME_CHAIN_VALID(FP, FRAME) generic_frame_chain_valid (FP, FRAME) #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP) #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \ - (SP) = sh_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) + (sh_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)) -/* override the standard get_saved_register function with +/* override the standard get_saved_register function with one that takes account of generic CALL_DUMMY frames */ #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) |