From 899931b638db757dc117885d367e2cded05332af Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 14 Sep 1993 16:22:07 +0000 Subject: [PATCH] * Makefile.in (a29k-tdep.o): Depend on $(defs_h). * config/a29k/tm-a29k.h (SAVED_PC_AFTER_CALL): Use gr122 not lr0 if this is a transparent procedure. --- gdb/ChangeLog | 6 ++++++ gdb/Makefile.in | 2 +- gdb/config/a29k/tm-a29k.h | 14 +++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 92e2fa881da..387e2a84896 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 14 09:12:17 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) + + * Makefile.in (a29k-tdep.o): Depend on $(defs_h). + * config/a29k/tm-a29k.h (SAVED_PC_AFTER_CALL): Use gr122 not lr0 + if this is a transparent procedure. + Mon Sep 13 16:06:43 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) * remote.c: Define remote_debug to 0 and #if 0 baud_rate. Temporary diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 0dd15847677..5db3b6514a0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -953,7 +953,7 @@ udr.o: 29k-share/udi/udr.c $(udiheaders) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/29k-share/udi/udr.c a29k-pinsn.o: a29k-pinsn.c $(bfd_h) $(dis-asm_h) -a29k-tdep.o: a29k-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) +a29k-tdep.o: a29k-tdep.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) a68v-nat.o: a68v-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) altos-xdep.o: altos-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h) arm-pinsn.o: arm-pinsn.c $(OP_INCLUDE)/arm.h $(defs_h) $(symtab_h) diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h index ae89beba47e..9306c967b7b 100644 --- a/gdb/config/a29k/tm-a29k.h +++ b/gdb/config/a29k/tm-a29k.h @@ -52,7 +52,9 @@ CORE_ADDR skip_prologue (); the new frame is not set up until the new function executes some instructions. */ -#define SAVED_PC_AFTER_CALL(frame) (read_register (LR0_REGNUM)) +#define SAVED_PC_AFTER_CALL(frame) ((frame->flags & TRANSPARENT) \ + ? read_register (TPC_REGNUM) \ + : read_register (LR0_REGNUM)) /* I'm not sure about the exact value of this, but based on looking at the stack pointer when we get to main this seems to be right. @@ -175,6 +177,7 @@ CORE_ADDR skip_prologue (); : (x) == 164 ? EXO_REGNUM \ : (error ("Internal error in SR_REGNUM"), 0)) #define GR96_REGNUM 0 + /* Define the return register separately, so it can be overridden for kernel procedure calling conventions. */ #define RETURN_REGNUM GR96_REGNUM @@ -183,16 +186,25 @@ CORE_ADDR skip_prologue (); to make call_function work right. */ #define SP_REGNUM MSP_REGNUM #define FP_REGNUM 33 /* lr1 */ + +/* Return register for transparent calling convention (gr122). */ +#define TPC_REGNUM (122 - 96 + GR96_REGNUM) + /* Large Return Pointer (gr123). */ #define LRP_REGNUM (123 - 96 + GR96_REGNUM) + /* Static link pointer (gr124). */ #define SLP_REGNUM (124 - 96 + GR96_REGNUM) + /* Memory Stack Pointer (gr125). */ #define MSP_REGNUM (125 - 96 + GR96_REGNUM) + /* Register allocate bound (gr126). */ #define RAB_REGNUM (126 - 96 + GR96_REGNUM) + /* Register Free Bound (gr127). */ #define RFB_REGNUM (127 - 96 + GR96_REGNUM) + /* Register Stack Pointer. */ #define RSP_REGNUM GR1_REGNUM #define LR0_REGNUM 32 -- 2.30.2