+2000-02-22 Kevin Buettner <kevinb@redhat.com>
+
+ * ppc-linux-nat.c (supply_gregset, supply_fpregset): Add return
+ type.
+ * ppc-linux-tdep.c (ppc_linux_at_sigtramp_return_path): Add
+ forward declaration.
+
+ * ppc-linux-tdep.c (ppc_linux_frame_saved_pc): Handle case
+ where the next frame is a signal handler caller.
+
+ * config/powerpc/tm-linux.h (PUSH_ARGUMENTS): Remove extraneous
+ undef.
+ (tm-linux.h): Include.
+ (tm-sysv4.h): Don't include (directly). config/tm-linux.h will
+ include this file for us.
+ (REALTIME_LO, REALTIME_HI): Don't define. These are defined by
+ config/tm-linux.h for us.
+ (SOFUN_ADDRESS_MAYBE_MISSING): Define.
+
2000-02-21 Kevin Buettner <kevinb@redhat.com>
* Makefile.in (ppc-linux-nat.c, ppc-linux-tdep.c): New files.
#define TM_LINUX_H
#include "powerpc/tm-ppc-eabi.h"
-
-#undef PUSH_ARGUMENTS
+/* Avoid warning from redefinition in tm-sysv4.h (included from tm-linux.h) */
+#undef SKIP_TRAMPOLINE_CODE
+#include "tm-linux.h"
/* We can single step on linux */
#undef SOFTWARE_SINGLE_STEP
/* Offset to saved PC in sigcontext, from <linux/signal.h>. */
#define SIGCONTEXT_PC_OFFSET 184
-/* Avoid warning from redefinition in tm-sysv4.h */
-#undef SKIP_TRAMPOLINE_CODE
-
-/* We need this file for the SOLIB_TRAMPOLINE stuff. */
-#include "tm-sysv4.h"
-
extern CORE_ADDR ppc_linux_skip_trampoline_code (CORE_ADDR pc);
#undef SKIP_TRAMPOLINE_CODE
#define SKIP_TRAMPOLINE_CODE(pc) ppc_linux_skip_trampoline_code (pc)
#define PROLOGUE_FIRSTLINE_OVERLAP
#endif
-/* Some versions of Linux have real-time signal support in the C library, and
- some don't. We have to include this file to find out. */
-#include <signal.h>
-
-#ifdef __SIGRTMIN
-#define REALTIME_LO __SIGRTMIN
-#define REALTIME_HI (__SIGRTMAX + 1)
-#else
-#define REALTIME_LO 32
-#define REALTIME_HI 64
-#endif
+/* N_FUN symbols in shared libaries have 0 for their values and need
+ to be relocated. */
+#define SOFUN_ADDRESS_MAYBE_MISSING
#endif /* #ifndef TM_LINUX_H */
return (ustart + 4 * regmap[regnum]);
}
+void
supply_gregset (gregset_t * gregsetp)
{
int regi;
supply_register (regi, (char *) (regp + regmap[regi]));
}
+void
supply_fpregset (fpregset_t * fpregsetp)
{
int regi;
#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31)
#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1)
+int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
+
/* Determine if pc is in a signal trampoline...
Ha! That's not what this does at all. wait_for_inferior in infrun.c
if (fi->signal_handler_caller)
{
CORE_ADDR regs_addr =
- read_memory_integer (fi->frame + PPC_LINUX_REGS_PTR_OFFSET, 4);
+ read_memory_integer (fi->frame + PPC_LINUX_REGS_PTR_OFFSET, 4);
/* return the NIP in the regs array */
return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4);
}
-
- return rs6000_frame_saved_pc (fi);
+ else if (fi->next && fi->next->signal_handler_caller)
+ {
+ CORE_ADDR regs_addr =
+ read_memory_integer (fi->next->frame + PPC_LINUX_REGS_PTR_OFFSET, 4);
+ /* return LNK in the regs array */
+ return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4);
+ }
+ else
+ return rs6000_frame_saved_pc (fi);
}
void