Skip to content

Commit 2490dbf

Browse files
author
Guinevere Larsen
committed
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 432eca4, 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, 65ab41b, which was pushed as obvious to fix the build issues. Approved-By: Tom Tromey <[email protected]>
1 parent aed5eee commit 2490dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdb/syscalls/riscv-canonicalize-syscall-gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _get_canon_syscalls_lines(
111111
canon_syscalls[syscall_num] = value
112112
# this is a place for corner cases
113113
elif syscall_name == "mmap":
114-
gdb_old_syscall_name = "gdb_old_mmap"
114+
gdb_old_syscall_name = "gdb_sys_old_mmap"
115115
value = (
116116
f" case {syscall_num}: return {gdb_old_syscall_name};\n"
117117
)

0 commit comments

Comments
 (0)