From: Tiezhu Yang Date: Thu, 21 Mar 2024 01:55:10 +0000 (+0800) Subject: gdb: syscalls: Add some tips for LoongArch xml files X-Git-Tag: gdb-15-branchpoint~663 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bec569fda7c76849cf3eb0e4a525f627d25f980;p=thirdparty%2Fbinutils-gdb.git gdb: syscalls: Add some tips for LoongArch xml files In commit a08dc2aa004b (gdb: syscalls: Add loongarch-linux.xml.in), it needs special handling when generating xml file. This should at least be mentioned in the file comment rather than git log to help the next person who regenerates this file understand what needs to be done, suggested by Pedro Alves, thank you. At the beginning, I only added the tips in loongarch-linux.xml.in, after executing the command "make" to generate loongarch-linux.xml from loongarch-linux.xml.in, it generates the same tips in the file loongarch-linux.xml automatically, so update loongarch-linux.xml.in and loongarch-linux.xml together. Signed-off-by: Tiezhu Yang Approved-by: Pedro Alves --- diff --git a/gdb/syscalls/loongarch-linux.xml b/gdb/syscalls/loongarch-linux.xml index 91e7bbc9691..6e85dbd7166 100644 --- a/gdb/syscalls/loongarch-linux.xml +++ b/gdb/syscalls/loongarch-linux.xml @@ -9,7 +9,29 @@ - The file mentioned above belongs to the Linux Kernel. --> + The file mentioned above belongs to the Linux Kernel. + + 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. + + + + + + + + + + +--> diff --git a/gdb/syscalls/loongarch-linux.xml.in b/gdb/syscalls/loongarch-linux.xml.in index e6e17b3f2b6..cf38f311abe 100644 --- a/gdb/syscalls/loongarch-linux.xml.in +++ b/gdb/syscalls/loongarch-linux.xml.in @@ -11,8 +11,29 @@ - The file mentioned above belongs to the Linux Kernel. --> + The file mentioned above belongs to the Linux Kernel. + 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. + + + + + + + + + + +-->