This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Update libunwind & ia64 unwinders


Hello,

I have committed the following patch:

2008-05-06  Joel Brobecker  <brobecker@adacore.com>

        * frame-unwind.c (frame_unwind_got_bytes): New function.
        * frame-unwind.h (frame_unwind_got_bytes): Add declaration.
        * libunwind-frame.h, libunwind-frame.c, ia64-tdep.c: Update
        for unwinder changes.

Tested on ia64-linux, with no regressions in the testsuite report.
Checked in.

A few things worth noting:

  - I introduced a new frame_unwind_got_bytes function that can be
    used when the value of register is stored inside a buffer.

  - The frame sniffers were converted mechanically. Their implementation
    is a little strange, and could probably be improved.

    It looks like both the normal and sigtramp sniffer are identical.
    In the old code, there were actually even returning the same
    frame_unwind struct... Also, the sniffers were sometimes sniffing
    more than one kind of unwinder: See ia64_libunwind_sigtramp_frame_sniffer
    for instance.

  - The old code had a guard inside ia64_libunwind_frame_this_id
    so that it would return a null frame ID if the previous frame's PC
    was null.  This is to prevent having a backtrace that finishes with
    "0x00000000 in ??" as its last frame.  The problem was that we have
    a loop with the new framework because computing the previous frame's
    PC requires us to know this_frame's ID, which we are in fact trying
    to compute.

    I didn't think it was a serious enough regression to spend more
    time on this. We need to find a cleaner general way of handling
    this concept, but that's a separate discussion.  If this is
    a problem, perhaps fetching the previous frame's PC using exlusively
    libunwind independently of the frame unwinding would allow us to get
    this functionality back.

-- 
Joel

Attachment: ia64-unwind.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]