2003-07-18 Andrew Cagney <cagney@redhat.com>
* dwarf2-frame.c (dwarf2_frame_sniffer): Use frame_unwind_address_in_block, instead of frame_pc_unwind. (dwarf2_frame_cache): Ditto.
This commit is contained in:
parent
e6e5e94cb8
commit
1ce5d6dda5
2 changed files with 17 additions and 18 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-07-18 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* dwarf2-frame.c (dwarf2_frame_sniffer): Use
|
||||||
|
frame_unwind_address_in_block, instead of frame_pc_unwind.
|
||||||
|
(dwarf2_frame_cache): Ditto.
|
||||||
|
|
||||||
2003-07-18 Andrew Cagney <cagney@redhat.com>
|
2003-07-18 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* user-regs.h (struct gdbarch): Declare opaque.
|
* user-regs.h (struct gdbarch): Declare opaque.
|
||||||
|
|
|
@ -491,15 +491,12 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
|
||||||
done for "normal" frames and not for resume-type frames (signal
|
done for "normal" frames and not for resume-type frames (signal
|
||||||
handlers, sentinel frames, dummy frames).
|
handlers, sentinel frames, dummy frames).
|
||||||
|
|
||||||
We don't do what GCC's does here (yet). It's not clear how
|
frame_unwind_address_in_block does just this.
|
||||||
reliable the method is. There's also a problem with finding the
|
|
||||||
right FDE; see the comment in dwarf_frame_p. If dwarf_frame_p
|
It's not clear how reliable the method is though - there is the
|
||||||
selected this frame unwinder because it found the FDE for the
|
potential for the register state pre-call being different to that
|
||||||
next function, using the adjusted return address might not yield
|
on return. */
|
||||||
a FDE at all. The problem isn't specific to DWARF CFI; other
|
fs->pc = frame_unwind_address_in_block (next_frame);
|
||||||
unwinders loose in similar ways. Therefore it's probably
|
|
||||||
acceptable to leave things slightly broken for now. */
|
|
||||||
fs->pc = frame_pc_unwind (next_frame);
|
|
||||||
|
|
||||||
/* Find the correct FDE. */
|
/* Find the correct FDE. */
|
||||||
fde = dwarf2_frame_find_fde (&fs->pc);
|
fde = dwarf2_frame_find_fde (&fs->pc);
|
||||||
|
@ -710,15 +707,11 @@ static const struct frame_unwind dwarf2_frame_unwind =
|
||||||
const struct frame_unwind *
|
const struct frame_unwind *
|
||||||
dwarf2_frame_sniffer (struct frame_info *next_frame)
|
dwarf2_frame_sniffer (struct frame_info *next_frame)
|
||||||
{
|
{
|
||||||
CORE_ADDR pc = frame_pc_unwind (next_frame);
|
/* Grab an address that is guarenteed to reside somewhere within the
|
||||||
/* The way GDB works, this function can be called with PC just after
|
function. frame_pc_unwind(), for a no-return next function, can
|
||||||
the last instruction of the function we're supposed to return the
|
end up returning something past the end of this function's body. */
|
||||||
unwind methods for. In that case we won't find the correct FDE;
|
CORE_ADDR block_addr = frame_unwind_address_in_block (next_frame);
|
||||||
instead we find the FDE for the next function, or we won't find
|
if (dwarf2_frame_find_fde (&block_addr))
|
||||||
an FDE at all. There is a possible solution (see the comment in
|
|
||||||
dwarf2_frame_cache), GDB doesn't pass us enough information to
|
|
||||||
implement it. */
|
|
||||||
if (dwarf2_frame_find_fde (&pc))
|
|
||||||
return &dwarf2_frame_unwind;
|
return &dwarf2_frame_unwind;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue