catch-syscall and XML - Initial thoughts

Sérgio Durigan Júnior sergiodj@linux.vnet.ibm.com
Wed Oct 22 21:42:00 GMT 2008


On Wed, 2008-10-22 at 17:32 -0400, Daniel Jacobowitz wrote:
> On Wed, Oct 22, 2008 at 07:30:01PM -0200, Sérgio Durigan Júnior wrote:
> > 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.
> 
> OK, that makes sense: have the filename specified by the arch code.
> As long as some arch code is already required, this is fine - and I
> think that's the case, since we need to know where to get the syscall
> number and args, right?

Exactly. Currently, in order for the arch to be supported, it needs to
define 3 methods:

- Retrieve the syscall number from the arch's registers;
- Convert a syscall number to a name;
- Convert a syscall name to a number;

Since the set of system calls is different between the architectures,
we'd end up with one XML file for each arch. This way, we'll only open
the specific arch XML file, nothing more :-)

Regards,

-- 
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil



More information about the Archer mailing list