From a08dc2aa004b28abef80967ef34b3a060ea78007 Mon Sep 17 00:00:00 2001 From: Tiezhu Yang Date: Thu, 29 Feb 2024 16:39:07 +0800 Subject: [PATCH] gdb: syscalls: Add loongarch-linux.xml.in There is no syscall.tbl for LoongArch because it uses generic syscalls, so it can not generate loongarch-linux.xml.in automatically through the script update-linux-from-src.sh, make use of the script update-linux.sh to generate loongarch-linux.xml.in. Like this: $ git clone https://sourceware.org/git/binutils-gdb.git gdb.git $ cd gdb.git/gdb/syscalls/ $ touch loongarch-linux.xml.in $ ./update-linux.sh loongarch-linux.xml.in Note that the system header file /usr/include/asm-generic/unistd.h may be different with the latest upstream Linux kernel uapi header file include/uapi/asm-generic/unistd.h, it is better to copy the upstream header file into the system header file when generating loongarch-linux.xml.in. There exist some __NR3264_ prefixed syscall numbers, replace them with digital numbers according to /usr/include/asm-generic/unistd.h and sort them by syscall number manually, maybe we can modify the script to do it automatically in the future. Signed-off-by: Tiezhu Yang Approved-By: John Baldwin --- gdb/syscalls/loongarch-linux.xml.in | 331 ++++++++++++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 gdb/syscalls/loongarch-linux.xml.in diff --git a/gdb/syscalls/loongarch-linux.xml.in b/gdb/syscalls/loongarch-linux.xml.in new file mode 100644 index 00000000000..e6e17b3f2b6 --- /dev/null +++ b/gdb/syscalls/loongarch-linux.xml.in @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5