This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/rs6000] suggest to get rid of rs6000_framedata...


On Thu, Jan 03, 2008 at 06:42:16PM +0100, Jerome Guitton wrote:
> 
> In rs6000-tdep.c, rs6000_framedata is a struct used to record the
> frame information collected during the prologue analysis, to be used
> to initialized the frame cache. In particular, it records the smallest
> number of the general purpose register has been saved on the stack
> (field gpr_saved). The prologue analysis assumes that all registers
> with a number greater than gpr_saved have been saved.
> 
> This assumption seems to be wrong. Not mentioned in the ABI; and, in
> practise, gcc can generate code that breaks this assertion. Typically,
> in the GNAT run-time lib:

I'm looking at the GCC prologue generation code, and it always saves a
consecutive block of registers from r31 downwards.  I suspect your
example is something special involving exception handling, but I might
just be misreading GCC.

> This can certainly be fixed by refining rs6000_framedata, adding some
> information of which register have been saved. Say, a bitmap, as the
> patch in attachment (given as an example, not meant to be checked
> in). But I would prefer to manipulate a trad_frame_saved_reg
> here. What about getting rid of rs6000_framedata and let skip_prologue
> manipulate a frame cache directly? It seems that rs6000_framedata is
> some legacy frome the pre-framified era of rs6000-tdep.c; it serves no
> useful purpose now; or am I missing something?

Yes, you're probably right, but changing this would require someone
brave enough to rewrite the existing code.  If you're brave enough to
write it, I'll be brave enough to review it for you :-)

Also see my patch from the month before, for more rs6000 prologue
unwinder improvements:

  http://sourceware.org/ml/gdb-patches/2007-12/msg00111.html

While some of that is admittedly too gross to commit, the rest of it
is solid.

-- 
Daniel Jacobowitz
CodeSourcery


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