From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16214 invoked by alias); 31 Mar 2009 15:45:21 -0000 Received: (qmail 15788 invoked by uid 22791); 31 Mar 2009 15:45:10 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Mar 2009 15:44:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 261D010DD0; Tue, 31 Mar 2009 15:44:53 +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 0326110A4A; Tue, 31 Mar 2009 15:44:53 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Log8y-0003t1-68; Tue, 31 Mar 2009 11:44:52 -0400 Date: Tue, 31 Mar 2009 16:39:00 -0000 From: Daniel Jacobowitz To: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= Cc: Pedro Alves , gdb-patches@sourceware.org, teawater Subject: Re: [PATCH 1/4] catch syscall -- try 4 -- Architecture-independent part Message-ID: <20090331154452.GA13260@caradoc.them.org> Mail-Followup-To: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= , Pedro Alves , gdb-patches@sourceware.org, teawater References: <1232929831.26873.22.camel@miki> <200901260053.06295.pedro@codesourcery.com> <1232945747.26873.27.camel@miki> <1232989355.26873.39.camel@miki> <20090201193306.GJ4597@caradoc.them.org> <1235561189.14363.20.camel@miki> <20090227221133.GA12904@caradoc.them.org> <1238352626.23609.14.camel@miki> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1238352626.23609.14.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 X-SW-Source: 2009-03/txt/msg00703.txt.bz2 On Sun, Mar 29, 2009 at 03:50:26PM -0300, Sérgio Durigan Júnior wrote: > ~"Catchpoint 1 (call to syscall 'chroot'), 0xffffe424 in > __kernel_vsyscall ()\n" > ~"0xffffe424 <__kernel_vsyscall+16>:\tpop %ebp\n" > *stopped,frame={addr="0xffffe424",func="__kernel_vsyscall",args=[]},thread-id="1",stopped-threads="all" > So, what do you think of it? Analyzing it, I think it's not so useful > except for the (obvious) part ~"Catchpoint 1 ...". Right. There ought to be a new reason="..." entry; search for EXEC_ASYNC_BREAKPOINT_HIT. There should probably be some semantic fields, too, like "old" for watchpoints. > > > > > +# Fills the struct syscall (passed as argument) with the corresponding > > > > > +# system call represented by syscall_number. > > > > > +M:void:get_syscall_by_number:int syscall_number, struct syscall *s:syscall_number, s > > > > > + > > > > > +# Fills the struct syscall (passed as argument) with the corresponding > > > > > +# system call represented by syscall_name. > > > > > +M:void:get_syscall_by_name:const char *syscall_name, struct syscall *s:syscall_name, s > > > > > + > > > > > +# Returns the array containing the syscall names for the architecture. > > > > > +M:const char **:get_syscall_names:void: > > > > > > > > If every target is going to use XML for this, these three do not need > > > > to be gdbarch methods and the support code can move from linux-tdep.c > > > > to xml-syscall.c. > > > > > > As far as I understood (from our discussion a few months ago), not every > > > target is supposed to use the XML for syscalls. That's specially true > > > for embedded systems and/or architectures for which the XML file is > > > missing (for some obscure reason, don't know). That's why I thought it > > > would be better not to generalize. > > > > I don't think this is a big deal. If it is, we can handle it the same > > way as for target-descriptions: pre-compile them into GDB. > > With this you mean that I should remove the methods from gdbarch? Yes, that's what I mean. The way I think about this is that every gdbarch routine is a way for some architecture to handle things differently. If we can make every architecture work the same way, we should do that instead. -- Daniel Jacobowitz CodeSourcery