From patchwork Thu Mar 21 01:55:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 87432 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B3693858C5E for ; Thu, 21 Mar 2024 01:55:58 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id CC2813858D1E for ; Thu, 21 Mar 2024 01:55:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC2813858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CC2813858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710986120; cv=none; b=mWUNCg/Y3t8eXVLAWfFf4mZOrYtmvcfrVkQ7LzRetc51Bfb982idT9/Van/UH/hL15gb4zemeP+epPgLxWRI3f5XkRuNXOZqt1TMC5RSF/JUs67qwTuVXZpA4f5Ih1IYOEDo1aVbgor9e1itW3oCXY0M13OHA86QmAzskZvS5+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710986120; c=relaxed/simple; bh=sXnmux5DS2PNJZItEWHjefpUrlQvUDPAiFSsdbaEksw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Obn26mJDSWS5SWOUgoleHqIxtu1229UeWGHVqe7XPxqyU2AanlIdLSbG12TqsjA1CWfutWZZYLh/tn0HaUgtZYH+Un6HBmeJ4TOUyZ+RmHr/j1cCTJ9hYNhNdg4Tek67/sOoUJBwbVxoOL+iOl3Xj8HMUmJVO3OXdZetxiApJaA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxvuuAk_tlK6EbAA--.23S3; Thu, 21 Mar 2024 09:55:13 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxbs1_k_tlE0RfAA--.51521S2; Thu, 21 Mar 2024 09:55:11 +0800 (CST) From: Tiezhu Yang To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: [PATCH] gdb: syscalls: Add some tips for LoongArch xml files Date: Thu, 21 Mar 2024 09:55:10 +0800 Message-ID: <20240321015510.31893-1-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxbs1_k_tlE0RfAA--.51521S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoWxCr15Kr48Wr1UGw1fZw4UJrc_yoWrAr1DpF sIvr45Kr1fCr1xurn3Ww1qgrn3ZFs7GrnFqF12y3yrArWDXw1FgwsxWas8CFy7JwsaqFWj qF48KryruFWUW3cCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUk0b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4j6r4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc 02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAF wI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7V AKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCj r7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6x IIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAI w20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x 0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUwmhFDUUUU X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org 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 --- gdb/syscalls/loongarch-linux.xml | 24 +++++++++++++++++++++++- gdb/syscalls/loongarch-linux.xml.in | 23 ++++++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) 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. + + + + + + + + + + +-->