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 Stack fram e]




> -----Original Message-----
> From: Richard Henderson [mailto:rth@redhat.com]
> Sent: Thursday, September 27, 2001 6:53 PM
> To: Fabrice Gautier
> Cc: 'gcc@gcc.gnu.org'
> Subject: Re: Bug in Dwarf2 .debug_frame section [RE: Gcc 3.0 and ARM
> Stack fram e]
> 
> 
> On Thu, Sep 27, 2001 at 06:43:09PM -0700, Fabrice Gautier wrote:
> > 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 ...
> 
> I don't do any ARM work at all, actually.
> 
> > 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
> 
> I'm against this.
> 
> > 2/ hack the arm back end so that it doesn't need offsets at all
> 
> This might be possible; I don't know what other relevant ARM coding 
> standards might be affected.  Richard Earnshaw would know.

Actually the code generated by the ARM compiler is quite different and seems
to generate a DW_CFA_def_cfa only once and with no offset, so I guess this
might be the best workaround...
> 
> > 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) 
> 
> This isn't possible in general, since without the offset from the
> register to the CFA, offsets elsewhere would not be representable
> with unsigned scaled quantities.

I'm not sure I understand your point. My idea is that when you have
CFA = R11 + 4
R0 = [CFA - 8]

you code instead CFA = R11 and R0 = [CFA - 4]

But for this to work you would need to know all the registers using the
"offset to CFA" rule and get the offsets values, before you can emit
DW_CFA_offset instructions. I don't think it's posible...
 
> The final alternative is of course to file a bug report against
> AXD and hope it gets fixed.

Sure I'll tell them, but i guess the fix won't be here for some times...

 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]