This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] block_innermost_frame tweak


Wow, that was fast, thanks for the quick review.

> Would it make sense to create a new function --- `frame_calling_pc',
> perhaps --- which encapsulates the logic in get_frame_block, and then
> use that instead of `frame->pc' in get_frame_block and
> block_innermost_frame?

Sure it does. A new patch is attached for:

2002-06-20  Joel Brobecker  <brobecker@gnat.com>

        * frame.h (get_frame_calling_pc): New function.

        * blockframe.c (get_frame_calling_pc): New function extracted
        from get_frame_block().
        (get_frame_block): Use get_frame_calling_pc().
        (block_innermost_frame): Match the frame calling pc against the
        block boundaries rather than the frame pc directly. This prevents
        a failure when a frame pc is actually a return address pointing
        immediately after the end of the given block.

No regression on Linux x86.

-- 
Joel

Attachment: frame.h.diff
Description: Text document

Attachment: blockframe.c.diff
Description: Text document


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