From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5866 invoked by alias); 30 Aug 2010 11:44:58 -0000 Received: (qmail 5858 invoked by uid 22791); 30 Aug 2010 11:44:58 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,TW_CP,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Aug 2010 11:44:48 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o7UBiJng010905; Mon, 30 Aug 2010 13:44:19 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o7UBiHr9023794; Mon, 30 Aug 2010 13:44:17 +0200 (CEST) Date: Mon, 30 Aug 2010 11:44:00 -0000 Message-Id: <201008301144.o7UBiHr9023794@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20100830071312.GF6831@host1.dyn.jankratochvil.net> (message from Jan Kratochvil on Mon, 30 Aug 2010 09:13:12 +0200) Subject: Re: [patch 5/9]#2 Move siginfo_fixup linux-nat -> inf-ptrace References: <20100830071312.GF6831@host1.dyn.jankratochvil.net> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00508.txt.bz2 > Date: Mon, 30 Aug 2010 09:13:12 +0200 > From: Jan Kratochvil > > 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 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