libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Get Function Address Patch


From: Jose Flavio Aguilar Paulino
Subject: Re: [Libunwind-devel] Get Function Address Patch
Date: Thu, 23 Aug 2007 13:48:40 -0300

Hi David,

There is nothing wrong with the current code, in truth, what I really
need is this:
...
ret = tdep_get_func_addr(as, sym->st_value, &func_addr);
if (ret != 0)
        continue;
...
The other changes are just something I've tough that would be good.
The only issue is that depending the way you use the variables, the
libunwind for power do not work with -O1 or -O2. The patch I send to you
it works.

regards,
Flávio


On Thu, 2007-08-23 at 10:37 -0600, David Mosberger-Tang wrote:
> Jose,
> 
> Before we make a change, I'd like to understand what's wrong with the
> existing code.  Could you please explain?
> 
> Thanks,
> 
>   --david
> 
> On 8/23/07, Jose Flavio Aguilar Paulino <address@hidden> wrote:
> > On Wed, 2007-08-22 at 13:07 -0600, David Mosberger-Tang wrote:
> > > Jose,
> > >
> > > I checked in a patch to support the tdep_get_func_addr() hook you
> > > need.  I didn't check in the changes to the distance-checking so far.
> > > Something seems fishy there.  In your patch, you check "cur_dist < 0",
> > > but cur_dist is of type "Elf_W(Addr)", which should be an unsigned
> > > type, AFAIK, so the check makes no sense.
> >
> > Sorry me David, what a wanted to was this:
> > ...
> > cur_dist = (Elf_W (Addr)) (ip - val);
> > if (unlikely (val < ip))
> >         continue;
> > ...
> > just a sanity/optimization check,
> > but you are right I can't use the cur_dist value!
> > Do you want to send a correct version of the patch?
> >
> > Thanks for reviewing it!
> >
> > --
> > Jose Flavio Aguilar Paulino
> > Toolchain Team
> > Software Engineer
> > IBM - Ltc Brazil
> >
> >
> 
> 
-- 
Jose Flavio Aguilar Paulino
(address@hidden)
System / Software Engineer

Toolchain Team
LTC, Linux Technology Center
IBM Brazil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]