From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11036 invoked by alias); 4 Nov 2008 20:03:58 -0000 Received: (qmail 10845 invoked by uid 22791); 4 Nov 2008 20:03:57 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Nov 2008 20:02:58 +0000 Received: (qmail 7631 invoked from network); 4 Nov 2008 20:02:56 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Nov 2008 20:02:56 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH 4/4] 'catch syscall' feature -- Build system, documentation =?utf-8?q?=09and?= testcase Date: Tue, 04 Nov 2008 20:03:00 -0000 User-Agent: KMail/1.9.10 Cc: =?utf-8?q?S=C3=A9rgio_Durigan_J=C3=BAnior?= References: <1225773088.24532.56.camel@miki> In-Reply-To: <1225773088.24532.56.camel@miki> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Content-Disposition: inline Message-Id: <200811042003.02591.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2008-11/txt/msg00045.txt.bz2 SGksCgpPbiBUdWVzZGF5IDA0IE5vdmVtYmVyIDIwMDggMDQ6MzE6MjgsIFPD qXJnaW8gRHVyaWdhbiBKw7puaW9yIHdyb3RlOgoKPiDCoMKgwqDCoMKgwqDC oMKgKiBNYWtlZmlsZS5pbjogU3VwcG9ydCBmb3IgcmVsb2NhdGFibGUgR0RC IGRhdGFkaXIgYW5kIFhNTAo+IMKgwqDCoMKgwqDCoMKgwqBzeXNjYWxsLgo+ IMKgwqDCoMKgwqDCoMKgwqAqIGNvbmZpZ3VyZS5hYzogU3VwcG9ydCBmb3Ig cmVsb2NhdGFibGUgR0RCIGRhdGFkaXIuCgpNaW5vciBuaXQgaGVyZSwgcGxl YXNlIHNwZWxsIG91dCBlbnRyaWVzIGZvciBmaWxlcyBhcmUgdG8KYmUgcmVn ZW5lcmF0ZWQuCgogIGUuZy4sCiAgICogY29uZmlndXJlLCBjb25maWcuaW4s IC4uLiA6IFJlZ2VuZXJhdGUuCgotLSAKUGVkcm8gQWx2ZXMK >From gdb-patches-return-59655-listarch-gdb-patches=sources.redhat.com@sourceware.org Tue Nov 04 20:20:49 2008 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 946 invoked by alias); 4 Nov 2008 20:20:48 -0000 Received: (qmail 827 invoked by uid 22791); 4 Nov 2008 20:20:47 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Nov 2008 20:20:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 733E210CE2; Tue, 4 Nov 2008 20:20:03 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 579D410C35; Tue, 4 Nov 2008 20:20:03 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KxSNe-00085p-P4; Tue, 04 Nov 2008 15:20:02 -0500 Date: Tue, 04 Nov 2008 20:20:00 -0000 From: Daniel Jacobowitz To: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= Cc: tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] 'catch syscall' feature -- Architecture-dependent part Message-ID: <20081104202002.GA30749@caradoc.them.org> Mail-Followup-To: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= , tromey@redhat.com, gdb-patches@sourceware.org References: <1225773084.24532.54.camel@miki> <1225817356.32321.25.camel@miki> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1225817356.32321.25.camel@miki> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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 Delivered-To: mailing list gdb-patches@sourceware.org X-SW-Source: 2008-11/txt/msg00046.txt.bz2 Content-length: 1419 On Tue, Nov 04, 2008 at 02:49:16PM -0200, Sérgio Durigan Júnior wrote: > Hi Tom, > > On Tue, 2008-11-04 at 09:15 -0700, Tom Tromey wrote: > > >>>>> "Sérgio" == Sérgio Durigan Júnior writes: > > > > Sérgio> * i386-linux-tdep.c: Define the syscall's XML struct to hold > > Sérgio> information about syscalls. > > Sérgio> (init_sysinfo): New. > > > > There is some code duplication between this and ppc-linux-tdep.c. > > It seems to me that much of the Linux code will be shared by all > > ports. So, I think the duplicated stuff should go in linux-nat.c. > > Thank you so much for this comment! I was aware of this replication, but > I still wasn't able to figure out a way to solve this. Now it looks so > obvious! I'll put the common functions in linux-nat.c :-). Please create a new linux-tdep.c file instead. Search for glibc-tdep to find the places to add it. You can't reference anything in a *-nat.c file from a *-tdep.c file. The nat files are "native GDB" support; the tdep files are used for both native and cross debuggers. > Right, I'll do it for both. But I have a question. Depending on the > architecture, I must pick the correct XML file to open and parse. That's > why I've put these functions in separate files. So, do you have a clue > on how to solve this? Have an architecture method that returns the filename, perhaps? -- Daniel Jacobowitz CodeSourcery