diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-08 22:47:46 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-08 22:47:46 +0000 |
commit | 8d357ccaa7453f32482275a89577fe5d4445f383 (patch) | |
tree | d0e2aa0fc8fc7b628a3e8103ef948e9163c3808f /gdb | |
parent | bca02a8a3a0a380439e57cd57abba4a9228f029a (diff) | |
download | gdb-8d357ccaa7453f32482275a89577fe5d4445f383.zip gdb-8d357ccaa7453f32482275a89577fe5d4445f383.tar.gz gdb-8d357ccaa7453f32482275a89577fe5d4445f383.tar.bz2 |
2003-01-08 Andrew Cagney <cagney@redhat.com>
* gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and
get_frame_base.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gcore.c | 4 | ||||
-rw-r--r-- | gdb/i386-linux-tdep.c | 15 |
3 files changed, 15 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9541dcf..d1355b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-01-08 Andrew Cagney <cagney@redhat.com> + + * gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and + get_frame_base. + 2003-01-08 David Carlton <carlton@math.stanford.edu> * linespec.c (decode_line_1): Move code into decode_variable. diff --git a/gdb/gcore.c b/gdb/gcore.c index 155ebe0..a2f10d7 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -179,7 +179,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top) return 0; /* Can't succeed without current frame. */ /* Save frame pointer of TOS frame. */ - *top = fi->frame; + *top = get_frame_base (fi); /* If current stack pointer is more "inner", use that instead. */ if (INNER_THAN (read_sp (), *top)) *top = read_sp (); @@ -189,7 +189,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top) fi = tmp_fi; /* Save frame pointer of prev-most frame. */ - *bottom = fi->frame; + *bottom = get_frame_base (fi); /* Now canonicalize their order, so that 'bottom' is a lower address (as opposed to a lower stack frame). */ diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index c7bd36a..9bf5a16 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -247,16 +247,16 @@ i386_linux_sigcontext_addr (struct frame_info *frame) { CORE_ADDR pc; - pc = i386_linux_sigtramp_start (frame->pc); + pc = i386_linux_sigtramp_start (get_frame_pc (frame)); if (pc) { CORE_ADDR sp; - if (frame->next) + if (get_next_frame (frame)) /* If this isn't the top frame, the next frame must be for the signal handler itself. The sigcontext structure lives on the stack, right after the signum argument. */ - return frame->next->frame + 12; + return get_frame_base (get_next_frame (frame)) + 12; /* This is the top frame. We'll have to find the address of the sigcontext structure by looking at the stack pointer. Keep @@ -264,20 +264,21 @@ i386_linux_sigcontext_addr (struct frame_info *frame) "pop %eax". If the PC is at this instruction, adjust the returned value accordingly. */ sp = read_register (SP_REGNUM); - if (pc == frame->pc) + if (pc == get_frame_pc (frame)) return sp + 4; return sp; } - pc = i386_linux_rt_sigtramp_start (frame->pc); + pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame)); if (pc) { - if (frame->next) + if (get_next_frame (frame)) /* If this isn't the top frame, the next frame must be for the signal handler itself. The sigcontext structure is part of the user context. A pointer to the user context is passed as the third argument to the signal handler. */ - return read_memory_integer (frame->next->frame + 16, 4) + 20; + return read_memory_integer (get_frame_base (get_next_frame (frame)) + + 16, 4) + 20; /* This is the top frame. Again, use the stack pointer to find the address of the sigcontext structure. */ |