This is the mail archive of the
mailing list for the Archer project.
Re: catch-syscall and XML - Initial thoughts
- From: Sérgio Durigan Júnior <sergiodj at linux dot vnet dot ibm dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: archer at sourceware dot org
- Date: Wed, 22 Oct 2008 19:30:01 -0200
- Subject: Re: catch-syscall and XML - Initial thoughts
- Organization: LTC - IBM
- References: <1224695122.13387.24.camel@miki> <20081022210549.GA1120@caradoc.them.org>
On Wed, 2008-10-22 at 17:05 -0400, Daniel Jacobowitz wrote:
> On Wed, Oct 22, 2008 at 03:05:22PM -0200, Sérgio Durigan Júnior wrote:
> > 2) Location of this file
> > This is a question that I've been wondering for a while. I think that
> > the correct location would be in a new gdb/syscalls directory, where
> > we'd put the XML files for each supported architecture. A guy (I don't
> > remember who) at #gdb asked me to put the files outside gdb/, in a
> > directory called libsyscall. I don't think that's a good idea (at least
> > for now) because I'm not aiming to extend this patch to a library.
> Where it goes in the source tree is not what I'm worried about - I'm
> more wondering where it goes in the install tree. For a
> multi-architecture GDB, how do we know which file to load?
Well, I'm assuming that the code responsible for this will be specific
for each architecture (e.g. for PPC/PPC64, it'll be at
ppc-linux-tdep.c). And I think we'll be able to proper select the
correct file to load depending on the arch, because only the specific
arch code will be executed, IIUC. Please, correct me if I'm wrong.
In the install tree, could it go somewhere under /usr/share ? Not sure
> > 3) Syntax
> > Since Daniel said that it'd be good to be able to extend this feature to
> > support syscalls arguments and types, I think this syntax would be
> > convenient:
> > <syscall number="1" name="foo">
> > <arg name="arg_name" number="0" type="arg_type"/>
> > ...
> > <arg name="arg_name" number="n" type="arg_type"/>
> > </syscall>
> > Initially the catch-syscall feature would only use the syscall name and
> > number info, but of course in a future not so distant we'd start using
> > the args info.
> Stick to <syscall number="1" name="foo"/> for now, include a DTD in
> the directory of syscalls, and extend it later. That's what I'd
> suggest. No need to plan things we aren't going to implement... as
> long as we design so that there's a logical extension mechanism.
Ok, I've already done the DTD file here. It's just a matter of deleting
the definitions for the "arg" tag.
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC