Re: [3/2] Inspect extra signal information, handle amd64 bi-arch gdb

Doug Evans
2009-02-04T22:07:26Z

On Wed, Feb 4, 2009 at 1:02 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> Here's a patch that applies on top of the other two. I think
> it's easy to read it split out from the other patches.
>
> This handles the layout conversion for x86/amd64, near the
> PTRACE_[G|S]ETSIGINFO calls, like we discussed yesterday.
>
> I'm not adjusting gdbserver here yet, since the original series
> added $_siginfo support for ARM, and x86/amd64 only, and, gdbserver
> on x86/amd64 isn't biarch aware yet. We can handle doing something
> like this there when we add $_siginfo gdbarch type support for ppc, or
> when we add biarch support for x86/amd64.
>
> What do you think? I've tried to make it as pretty as I could. :-)
>
> Please, don't hesitate pointing me at anything bogus I may
> be doing.

Another way to go, for reference sake, is to write a routine that
converts a struct siginfo to a string, and another that converts a
string to a struct siginfo, and have both gdb and gdbserver use those
routines. Then bi-arch gdbserver support would pretty much come for
free.

Over time it seems like a growing amount of code would be useful to
share between gdb and gdbserver. Do we have a plan for that?