Re: [DynInst_API:] Variable size and frame pointers


Date: Wed, 20 Aug 2014 10:55:25 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] Variable size and frame pointers
On 08/20/2014 10:23 AM, Fabian Mager wrote:
> 
>> If you look at the variable locations of the parameters, they should 
>> have address ranges attached to them, and you should be able to set 
>> your breakpoint at the beginning of the valid range with no problem.
> 
> Looking at the variable locations, I stumbled across another issue. 
> After compiling with clang (3.4), I get the following output when asking 
> for the locations of the parameters of a function:
> 
> f_foo->getParams
>      localVar (type, name): s_t, s
>      getLocationLists.size: 1
>          lowPC: 4195632
>          hiPC: 4195675
>          ...
> 
> This is fine and with that I can later on retrieve the values via 
> getLocalVariableValues(). But when I compile it with gcc (4.8.2), the 
> output is:
> 
> f_foo->getParams
>      localVar (type, name): s_t, s
>      getLocationLists.size: 0
> 
> Due to the emtpy LocationList, getLocalVariableValues() always returns 
> -2 (EOutOfScope). Do I miss something here or is this possibly a bug?

An empty location list reminds me of this gcc bug:
https://bugzilla.redhat.com/show_bug.cgi?id=904252
-> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56154
... but I think that's supposed to be fixed in 4.8.2.

If you're able to compare the actual DWARF generated by clang and gcc,
that might shed some light.  Or if you can share the binaries, I can
take a look at them.
[← Prev in Thread] Current Thread [Next in Thread→]