summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-18 22:19:33 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-18 22:19:33 +0000
commit797afe95d4006be6d9a1c70039998b732bd99ae8 (patch)
tree2b90d1e03c7a90ea71b0e288fd52d9ad1f61cc00 /gdb/ppc-linux-tdep.c
parentb10bf9d26d80c767faaa85a7e54295eebc1addca (diff)
downloadgdb-797afe95d4006be6d9a1c70039998b732bd99ae8.tar.gz
2002-11-18 Andrew Cagney <ac131313@redhat.com>
* frame.h (enum frame_type): Define. (get_frame_type): Declare. (struct frame_info): Add field `type'. Delete field signal_handler_caller. (deprecated_set_frame_signal_handler_caller): Declare. * frame.c (get_frame_type): New function. (deprecated_set_frame_type): New function. (create_new_frame): Set the frame's type. (get_prev_frame): Similar. * sparc-tdep.c: Use get_frame_type instead of signal_handler_caller. * s390-tdep.c: Ditto. * m68klinux-nat.c: Ditto. * ns32k-tdep.c: Ditto. * x86-64-linux-tdep.c: Ditto. * vax-tdep.c: Ditto. * rs6000-tdep.c: Ditto. * ppc-linux-tdep.c: Ditto. * i386-interix-tdep.c: Ditto. * mips-tdep.c: Ditto. * m68k-tdep.c: Ditto. * hppa-tdep.c: Ditto. * ia64-tdep.c: Ditto. * cris-tdep.c: Ditto. * arm-tdep.c: Ditto. * alpha-tdep.c: Ditto. * i386-tdep.c: Ditto. * stack.c: Ditto. * ada-lang.c: Ditto. * blockframe.c: Update. * i386-interix-tdep.c (i386_interix_back_one_frame): Use deprecated_set_frame_type instead of signal_handler_caller. * ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto. * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto. * breakpoint.h: Delete FIXME suggesting get_frame_type. Index: tui/ChangeLog 2002-11-18 Andrew Cagney <ac131313@redhat.com> * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of signal_handler_caller.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 6adfe297170..de687029fa6 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -143,10 +143,15 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
behavior is ever fixed.)
PC_IN_SIGTRAMP is called from blockframe.c as well in order to set
- the signal_handler_caller flag. Because of our strange definition
- of in_sigtramp below, we can't rely on signal_handler_caller
+ the frame's type (if a SIGTRAMP_FRAME). Because of our strange
+ definition of in_sigtramp below, we can't rely on the frame's type
getting set correctly from within blockframe.c. This is why we
- take pains to set it in init_extra_frame_info(). */
+ take pains to set it in init_extra_frame_info().
+
+ NOTE: cagney/2002-11-10: I suspect the real problem here is that
+ the get_prev_frame() only initializes the frame's type after the
+ call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this
+ code shouldn't be working its way around a bug :-(. */
int
ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
@@ -318,14 +323,14 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc)
CORE_ADDR
ppc_linux_frame_saved_pc (struct frame_info *fi)
{
- if (fi->signal_handler_caller)
+ if ((get_frame_type (fi) == SIGTRAMP_FRAME))
{
CORE_ADDR regs_addr =
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);
}
- else if (fi->next && fi->next->signal_handler_caller)
+ else if (fi->next && (get_frame_type (fi->next) == SIGTRAMP_FRAME))
{
CORE_ADDR regs_addr =
read_memory_integer (fi->next->frame + PPC_LINUX_REGS_PTR_OFFSET, 4);
@@ -347,9 +352,11 @@ ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi)
this is a signal frame by looking to see if the pc points
at trampoline code */
if (ppc_linux_at_sigtramp_return_path (fi->pc))
- fi->signal_handler_caller = 1;
+ deprecated_set_frame_type (fi, SIGTRAMP_FRAME);
else
- fi->signal_handler_caller = 0;
+ /* FIXME: cagney/2002-11-10: Is this double bogus? What
+ happens if the frame has previously been marked as a dummy? */
+ deprecated_set_frame_type (fi, NORMAL_FRAME);
}
}
@@ -367,7 +374,7 @@ ppc_linux_frameless_function_invocation (struct frame_info *fi)
void
ppc_linux_frame_init_saved_regs (struct frame_info *fi)
{
- if (fi->signal_handler_caller)
+ if ((get_frame_type (fi) == SIGTRAMP_FRAME))
{
CORE_ADDR regs_addr;
int i;
@@ -405,7 +412,7 @@ CORE_ADDR
ppc_linux_frame_chain (struct frame_info *thisframe)
{
/* Kernel properly constructs the frame chain for the handler */
- if (thisframe->signal_handler_caller)
+ if ((get_frame_type (thisframe) == SIGTRAMP_FRAME))
return read_memory_integer ((thisframe)->frame, 4);
else
return rs6000_frame_chain (thisframe);