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/m68k | |
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/m68k')
-rw-r--r-- | gdb/config/m68k/tm-delta68.h | 14 | ||||
-rw-r--r-- | gdb/config/m68k/tm-isi.h | 14 | ||||
-rw-r--r-- | gdb/config/m68k/tm-m68k.h | 11 | ||||
-rw-r--r-- | gdb/config/m68k/tm-news.h | 14 |
4 files changed, 9 insertions, 44 deletions
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h index 5965bb5..e0692fb 100644 --- a/gdb/config/m68k/tm-delta68.h +++ b/gdb/config/m68k/tm-delta68.h @@ -75,18 +75,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ -#define FRAME_NUM_ARGS(val, fi) \ -{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \ - register int insn = 0177777 & read_memory_integer (pc, 2); \ - val = 0; \ - if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \ - val = read_memory_integer (pc + 2, 2); \ - else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \ - || (insn & 0170777) == 0050117) /* addqw */ \ - { val = (insn >> 9) & 7; if (val == 0) val = 8; } \ - else if (insn == 0157774) /* addal #WW, sp */ \ - val = read_memory_integer (pc + 2, 4); \ - val >>= 2; } +extern int delta68_frame_num_args PARAMS ((struct frame_info *fi)); +#define FRAME_NUM_ARGS (delta68_frame_num_args ((fi))) /* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear the processor's instruction cache as it should. */ diff --git a/gdb/config/m68k/tm-isi.h b/gdb/config/m68k/tm-isi.h index ae8ccbf..5653fe6 100644 --- a/gdb/config/m68k/tm-isi.h +++ b/gdb/config/m68k/tm-isi.h @@ -41,18 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ -#define FRAME_NUM_ARGS(val, fi) \ -{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \ - register int insn = 0177777 & read_memory_integer (pc, 2); \ - val = 0; \ - if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \ - val = read_memory_integer (pc + 2, 2); \ - else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \ - || (insn & 0170777) == 0050117) /* addqw */ \ - { val = (insn >> 9) & 7; if (val == 0) val = 8; } \ - else if (insn == 0157774) /* addal #WW, sp */ \ - val = read_memory_integer (pc + 2, 4); \ - val >>= 2; } +extern int isi_frame_num_args PARAMS ((struct frame_info *fi)); +#define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi))) /* Put here the code to store, into a struct frame_saved_regs, the addresses of the saved registers of frame described by FRAME_INFO. diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 9cbb41f..4835b39 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -274,13 +274,8 @@ do \ /* 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) \ - do { \ - if ((FI)->signal_handler_caller) \ - (FRAMELESS) = 0; \ - else \ - (FRAMELESS) = frameless_look_for_prologue(FI); \ - } while (0) +#define FRAMELESS_FUNCTION_INVOCATION(FI) \ + (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI)) /* This was determined by experimentation on hp300 BSD 4.3. Perhaps it corresponds to some offset in /usr/include/sys/user.h or @@ -311,7 +306,7 @@ do \ /* We can't tell how many args there are now that the C compiler delays popping them. */ #if !defined (FRAME_NUM_ARGS) -#define FRAME_NUM_ARGS(val,fi) (val = -1) +#define FRAME_NUM_ARGS(fi) (-1) #endif /* Return number of bytes at start of arglist that are not really args. */ diff --git a/gdb/config/m68k/tm-news.h b/gdb/config/m68k/tm-news.h index 9fca446..b9736a0 100644 --- a/gdb/config/m68k/tm-news.h +++ b/gdb/config/m68k/tm-news.h @@ -59,17 +59,7 @@ Here is an m-news.h file for gdb. It supports the 68881 registers. /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ -#define FRAME_NUM_ARGS(val, fi) \ -{ register CORE_ADDR pc = FRAME_SAVED_PC (fi); \ - register int insn = 0177777 & read_memory_integer (pc, 2); \ - val = 0; \ - if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */ \ - val = read_memory_integer (pc + 2, 2); \ - else if ((insn & 0170777) == 0050217 /* addql #N, sp */ \ - || (insn & 0170777) == 0050117) /* addqw */ \ - { val = (insn >> 9) & 7; if (val == 0) val = 8; } \ - else if (insn == 0157774) /* addal #WW, sp */ \ - val = read_memory_integer (pc + 2, 4); \ - val >>= 2; } +extern int news_frame_num_args PARAMS ((struct frame_info *fi)); +#define FRAME_NUM_ARGS (news_frame_num_args ((fi))) #include "m68k/tm-m68k.h" |