]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/record] Make enum gdb_syscall value names consistent
authorTom de Vries <tdevries@suse.de>
Mon, 31 Mar 2025 18:30:48 +0000 (20:30 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 31 Mar 2025 18:30:48 +0000 (20:30 +0200)
commit432eca4113d5748ad284a068873455f9962b44fe
tree399704cb9bc88cf07da10463ffb88aac69de2c6a
parent93d835b06ca08f575d20b6d10c2d61419a1049ee
[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>
gdb/aarch64-linux-tdep.c
gdb/amd64-linux-tdep.c
gdb/arm-linux-tdep.c
gdb/i386-linux-tdep.c
gdb/linux-record.c
gdb/linux-record.h
gdb/loongarch-linux-tdep.c