From: Guinevere Larsen Date: Wed, 23 Apr 2025 14:26:51 +0000 (-0300) Subject: gdb: update corner case when canonicalizing riscv syscall names X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2aba1ce1326df73c03641e1cb01d2c5aa577015;p=thirdparty%2Fbinutils-gdb.git gdb: update corner case when canonicalizing riscv syscall names The script syscalls/riscv-canonicalize-syscall-gen.py has been recently introduced to help support record-full in riscv systems. However, it was developed before commit 432eca4113d5748ad284a068873455f9962b44fe, which made the GDB enum more consistent, which forced the python script to have a corner case for the "gdb_old_mmap" case. Since the aforementioned commit has already been merged, we need to update the special case for the mmap syscall. A special case is still needed because the script would expect that the glibc sources call the syscall "old_mmap", or that gdb call it "gdb_sys_mmap", neither of which happens unfortunately. This commit doesn't change the .c file because it was already fixed by a different commit, 65ab41b7d5c612b6000b28f4c50bb256b2a9e22b, which was pushed as obvious to fix the build issues. Tested-By: Luis Machado Approved-By: Luis Machado --- diff --git a/gdb/syscalls/riscv-canonicalize-syscall-gen.py b/gdb/syscalls/riscv-canonicalize-syscall-gen.py index c7dda93d0cd..40039bb0f15 100755 --- a/gdb/syscalls/riscv-canonicalize-syscall-gen.py +++ b/gdb/syscalls/riscv-canonicalize-syscall-gen.py @@ -111,7 +111,7 @@ class Generator: canon_syscalls[syscall_num] = value # this is a place for corner cases elif syscall_name == "mmap": - gdb_old_syscall_name = "gdb_old_mmap" + gdb_old_syscall_name = "gdb_sys_old_mmap" value = ( f" case {syscall_num}: return {gdb_old_syscall_name};\n" )