Re: [design change] record-replay linux ABI level

Joel Brobecker
2012-05-14T14:57:14Z

> static enum gdb_syscall
> arm_canonicalize_syscall (int syscall)
> {
> enum { arm_sys_prlimit64 = 369 };
>
> if (syscall <= arm_sys_prlimit64)
> {
> if (syscall <= gdb_sys_sched_getaffinity)
> return syscall;
> else if (syscall <= gdb_sys_fadvise64_64)
> {
> return (syscall + (unsigned int)2);
> }
> else
> {
> switch (syscall)

Why not define a table that defines the mapping for every syscall?
We do that for registers -vs- register names, for instance, and that
works very well.

static enum gdb_syscall arm_syscal_map[] =
{
gdb_sys_restart_syscall, gdb_sys_exit, gdb_sys_fork,
[...]
gdb_sys_sched_getaffinity, gdb_sys_arm_trap16,
[...]
};

--
Joel