[gdb/record] Make enum gdb_syscall value names consistent

In enum gdb_syscall, there are 3 entries that do not have the gdb_sys_ prefix
...
$ grep gdb_old_ gdb/linux-record.h
  gdb_old_select = 82,
  gdb_old_readdir = 89,
  gdb_old_mmap = 90,
...
like all the other entries:
...
  gdb_sys_restart_syscall = 0,
  gdb_sys_exit = 1,
  gdb_sys_fork = 2,
  gdb_sys_read = 3,
...

The three correspond to these entries in
arch/x86/entry/syscalls/syscall_32.tbl:
...
<number>  <abi>   <name>     <entry point>      [<compat entry point> [noreturn]]
82        i386    select     sys_old_select     compat_sys_old_select
89        i386    readdir    sys_old_readdir    compat_sys_old_readdir
90        i386    mmap       sys_old_mmap       compat_sys_ia32_mmap
...

As we can see, the enum uses the entry point name, but without the sys_
prefix.

There doesn't seem to be a good reason for this.

There's another enum value:
...
  gdb_sys_old_getrlimit = 76,
...
corresponding to:
...
76        i386    getrlimit  sys_old_getrlimit  compat_sys_old_getrlimit
...
where we do use the sys_ prefix.

Fix this by consistenly using the gdb_sys_ prefix in enum gdb_syscall.

No functional changes.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom de Vries
2025-03-31 20:30:48 +02:00
parent 93d835b06c
commit 432eca4113
7 changed files with 14 additions and 14 deletions

View File

@@ -412,7 +412,7 @@ amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
case amd64_sys_mmap:
case amd64_x32_sys_mmap:
return gdb_old_mmap;
return gdb_sys_old_mmap;
case amd64_sys_mprotect:
case amd64_x32_sys_mprotect: