aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuinevere Larsen <guinevere@redhat.com>2025-04-23 11:26:51 -0300
committerGuinevere Larsen <guinevere@redhat.com>2025-04-24 15:48:29 -0300
commitb2aba1ce1326df73c03641e1cb01d2c5aa577015 (patch)
treee4d47592c803e5eb98d7610c2a5e9fd5b4805351
parent0ad5b8a3b7cd2cfbdef3a3cbe45975b6d027a283 (diff)
downloadbinutils-b2aba1ce1326df73c03641e1cb01d2c5aa577015.zip
binutils-b2aba1ce1326df73c03641e1cb01d2c5aa577015.tar.gz
binutils-b2aba1ce1326df73c03641e1cb01d2c5aa577015.tar.bz2
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 <luis.machado@arm.com> Approved-By: Luis Machado <luis.machado@arm.com>
-rwxr-xr-xgdb/syscalls/riscv-canonicalize-syscall-gen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/syscalls/riscv-canonicalize-syscall-gen.py b/gdb/syscalls/riscv-canonicalize-syscall-gen.py
index c7dda93..40039bb 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"
)