[patch] Add support for single register window model on SPARC
Eric Botcazou
ebotcazou@adacore.com
Tue Jun 21 18:08:00 GMT 2011
> Hmm, if full CFI for the explicit register saving code is emitted, I'd
> expect backtraces to work.
Exceptions work well so the CFIs are very likely correct, at least in eh_frame.
A quick look didn't reveal differences between eh_frame and debug_frame so this
is a little strange then. Is GDB supposed to fall back to "manual" unwinding
only when the DWARF unwinder gives up?
> I'd like to get a chance to run a regression test on OpenBSD/sparc64.
> Can you give me a couple of days and perhaps ping me towards the end
> of this week to remind me if I haven't responded by then?
Sure.
> For consistency that probably should be (cache->copied_regs_mask & 0x04).
Fixed.
> Elsewhere in GDB, or at least in the code written by me, like most of
> the existing sparc/sparc64 code places the '=' sign on the line
> before. I can see how you can interpret the GNU coding style to say
> that you should put the '=' sign on the next line, but for now it'd be
> better to be consistent with the rest of the code. Can you change
> this?
Sure, done. This was the standard GCC style.
> This change isn't quite right. The wcookie stuff is there to support
> StackGhost[1], which is unsupportable for the "flat" model. So what
> needs to be checked here is whether we executed a save instruction or
> not. As far as I know OpenBSD is the only OS that does StackGhost.
> On everything else wcookie will be 0. So you can probably leave this
> as is right now, since the existing frameless_p check is more correct
> than what you have in your diff.
OK, reverted.
> StackGhost again. Better leave this alone as well.
Yes, there is a bit of code duplication in these files. ;-)
> [1] http://projects.cerias.purdue.edu/stackghost/stackghost/index.html
Thanks for the pointer.
Revised patch attached, will retest if approved.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-mflat-2.diff
Type: text/x-diff
Size: 16463 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110621/6e385bd0/attachment.bin>
More information about the Gdb-patches
mailing list