This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 5/9]#2 Move siginfo_fixup linux-nat -> inf-ptrace
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 30 Aug 2010 13:44:17 +0200 (CEST)
- Subject: Re: [patch 5/9]#2 Move siginfo_fixup linux-nat -> inf-ptrace
- References: <20100830071312.GF6831@host1.dyn.jankratochvil.net>
> Date: Mon, 30 Aug 2010 09:13:12 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Hi,
>
> as the siginfo biarch conversion needs to be done now even during inf-ptrace
> ptrace calls the interface had to be moved there. There are no code changes
> of it in this patch.
Couple of issues/questions:
* It's difficult to review this diff as is, since the part that
actually uses this stuff in the inf-ptrace.c file is missing. I may
be missing something, but my gut feeling is that the siginfo
processing is (at least for now) a Linux-specific feature and
therefore belongs in linux-nat.c.
Assuming that my gut feeling is wrong:
* Isn't it better to make the siginfo conversion/fixup part of the
target vector?
* The memcpy that's being done requires the size of "struct siginfo"
to be known. I'm not sure all platforms that use ptrace(2) actually
have a "struct siginfo" (OpenBSD, HP-UX 10.20 and Linux have it).
I'm not sure <signal.h> is enough to actually make the definition
available (have some doubts here for HP-UX 10.20).
* I'd like to see siginfo_fixup() renamed into inf_ptrace_siginfo_fixup(),
and made static if possible.
* All of this probably should be #ifdef PT_GETSIGINFO.
Cheers,
Mark