Mark,

Sorry for the late response --- I thought I had replied earlier.

I'm fine with the patch in principe, but I think it needs to go into a
dwarf-specific file ("mi" stands for "machine-independent").

Regards,

  --david

On 11/19/07, Mark Wielaard <[EMAIL PROTECTED]> wrote:
> Hi David,
>
> On Mon, 2007-10-08 at 12:56 -0600, David Mosberger-Tang wrote:
> > I'm not sure I understand what the real issue is this patch is trying
> > to solve.  Using unw_get_proc_name() will *not* give you reliably the
> > starting address of the procedure.  It just gives you the address of a
> > preceding (hopefully nearby) label.  Perhaps Frysk is mixing
> > proc_info.start_ip and the info returned by unw_get_proc_name(), but I
> > don't understand exactly what's going on and why the current libunwind
> > behavior would be a problem.   Can you explain, perhaps with an
> > example?
>
> Indeed, that is what we were doing. And it took me some time to realize
> why we were trying to make unw_get_proc_info more accurate. It all comes
> down to wanting to have access the current IP of the cursor even though
> the frame might not have accurate dwarf info itself. So in some places
> we weren't using unw_get_reg(UNW_REG_IP), because that does a dwarf
> lookup of the ip, but went through unw_get_proc_info() and
> unw_get_proc_name() because those fell back to using the current cursor
> ip if the lookup failed. The following patch does the same for
> unw_get_reg() and makes things a little bit more efficient in general.
>
> 2007-11-19  Mark Wielaard  <[EMAIL PROTECTED]>
>
>     * src/mi/Gget_reg.c (unw_get_reg): Use cached value from cursor
>     when looking for UNW_REG_IP.
>
> If it looks sane it would be nice to get this in.
>
> Cheers,
>
> Mark
>
>


-- 
Mosberger Consulting LLC, http://www.mosberger-consulting.com/


_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to