This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


I would have liked to think the same; but the way linux-record.h
addresses all the architecture, the enum sycall, is defiend
generically.

what I think is define it in arch files, as syscalls are partially
dependent on arch, though they follow posix standard.

so each arch file would have their own map, compare to current generic
map in linux-record.h

Regards,
Oza.

On Mon, May 14, 2012 at 8:26 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]