[design change] record-replay linux ABI level

Joel Brobecker brobecker@adacore.com
Mon May 14 14:57:00 GMT 2012


> 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



More information about the Gdb-patches mailing list