]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/tdep] Use SYSCALL_MAP_RENAME for aarch64 and loongarch
authorTom de Vries <tdevries@suse.de>
Tue, 18 Mar 2025 07:45:54 +0000 (08:45 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 18 Mar 2025 07:45:54 +0000 (08:45 +0100)
commit57d2ceb311aaaf02fe6fae194e1280001a087b6f
tree8e18230f7e811b03ff47289f884c936d12711d90
parent7b2a5f7183b946a0a2644a505892b7e0aefbbfd1
[gdb/tdep] Use SYSCALL_MAP_RENAME for aarch64 and loongarch

There are currently two functions using macros SYSCALL_MAP and
UNSUPPORTED_SYSCALL_MAP: aarch64_canonicalize_syscall, and
loongarch_canonicalize_syscall.

Here [1] I propose to do the same in i386_canonicalize_syscall, using one
additional macro: SYSCALL_MAP_RENAME.

Add the same macro in aarch64_canonicalize_syscall and
loongarch_canonicalize_syscall, and use it to map aarch64_sys_mmap and
loongarch_sys_mmap to gdb_sys_mmap2.

While we're at it:
- reformat the macro definitions to be more readable,
- add missing macro undefs in aarch64_canonicalize_syscall, and
- fix indentation in aarch64_canonicalize_syscall.

No functional changes.

Tested by rebuilding on x86_64-linux.

Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
[1] https://sourceware.org/pipermail/gdb-patches/2025-March/216230.html
gdb/aarch64-linux-tdep.c
gdb/loongarch-linux-tdep.c