This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

RE: Bug in Dwarf2 .debug_frame section [RE: Gcc 3.0 and ARM Stackfram e]


> -----Original Message-----
> From: Richard Henderson [mailto:rth@redhat.com]
> Subject: Re: Bug in Dwarf2 .debug_frame section [RE: Gcc 3.0 and ARM
> Stackfram e]
> 
> 
> On Thu, Sep 27, 2001 at 04:46:42PM -0700, Fabrice Gautier wrote:
> > Now i can generate the .debug_frame by a gross hack.
> 
> Bother.  This got fixed on mainline, but not the 3.0 branch.
> Also, as Jason and I discussed a while back we should no longer
> try to re-use .eh_frame as debug info, since it's now encoded
> differently.

Well, my hack had basically the same effect that this patch.
 
> > Actually if you look at the way it is coded at the lowest 
> level the offset
> > shown here is calculated by (value coded) * (data align 
> factor). You can see
> > in the first line the data align factor is fffffffc (= -4) 
> so when the debug
> > info has been coded by gcc it had forgotten the "data align 
> factor" in this
> > case.
> 
> Incorrect.  While the language is unclear in the dwarf 2.0 text,
> section 6.4.2/15 of the dwarf 2.1 draft explicitly says that the
> value is not factored.

Hum, I only have dwarf 2.0, which says "offset" and i guess it meant
implicitly not factored, but then I guess the Arm Debugger doesn't make this
assumption... 
Anyway, by using a factored offset here i would have needed a negative
offset where Dwarf spec says "unsigned". Hum... 

I don't know if you (or maybe somebody else) is using the Arm debugger (AXD
from ADS v1.1 in my case) to test that but I can only think of three
workarounds:

1/ Hack the backend not to need negative offset and go against the dwarf
spec (ie factorise the offset) but in this case i'm not even sure if axd
would behave itself as i guess it would
2/ hack the arm back end so that it doesn't need offsets at all
3/ hack the dwarf layer so that instead of coding an offset for the cfa it
just remove the offset and adjust all the register with this offset... (this
should be possilbe in my particular case here but may be not in all cases) 

	Thanks

-- 
Fabrice Gautier
Software Engineer, Sigma Designs
Fabrice_Gautier@sdesigns.com


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