From patchwork Tue Nov 26 08:59: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: 101880 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 8A5EB3857709 for ; Tue, 26 Nov 2024 09:00:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A5EB3857709 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 ECCF53858031 for ; Tue, 26 Nov 2024 08:59:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECCF53858031 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 ECCF53858031 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=1732611563; cv=none; b=UJK8KgW++t+bPxIrlYTWr3dEyHMKeZBsZLjNu8CHTVBPa42vr4FFVfOjxOBWGs2N7nU046sNB6qwvjTYENhHrvri9Sd1Tfskxnf1lrGnsSo3I2ZJUbEVnAP9gDo1H7NA3belgNdiAUWYqFc9cgB9ddpHEn5N5L9geL1SMwYT2rk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732611563; c=relaxed/simple; bh=gM27wEFoA2N0nsowKm58hQ8PJbhg+caCpmwwJqdDL1s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=JekbMRpy5BW56+yAk477BAVRtonArtFATKRzsenHbfDitsDe2aycIpM9P2yLi/DKK61FtZy5u+K51wUe8PQlR0fSCAe5C01D1t15h58VbGyDSiENIyp8AYnO4Lcli1ScCAf4Xy920AAr6K7P1mjv2mOk4Q1LxC9Mf2eTRPSPZsc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECCF53858031 Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8BxIK_ojUVnlABJAA--.53293S3; Tue, 26 Nov 2024 16:59:20 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by front1 (Coremail) with SMTP id qMiowMCxfcLijUVngFhoAA--.5123S3; Tue, 26 Nov 2024 16:59:17 +0800 (CST) From: Tiezhu Yang To: gdb-patches@sourceware.org Subject: [PATCH 1/3] gdb: syscalls: Handle __NR3264_ prefixed syscall number Date: Tue, 26 Nov 2024 16:59:10 +0800 Message-ID: <20241126085912.30599-2-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20241126085912.30599-1-yangtiezhu@loongson.cn> References: <20241126085912.30599-1-yangtiezhu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: qMiowMCxfcLijUVngFhoAA--.5123S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7WFyUWr47uF4UZw4kXw4UZFc_yoW8Xr4xpF 43AFyUt3yS9a1kuanrJr1YgFWSv34kAr1UuFW2kw4rAFyDtw1Fgr4a9Fs8JF9rCrWSqF47 XF4rX34j9rW8ZacCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07URa0PUUUUU= X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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 gdb commit a08dc2aa004b ("gdb: syscalls: Add 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, it is better to modify update-linux.sh to do the work automatically. By the way, a Linux kernel patch did the similar change. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6e1cc6b7220 Signed-off-by: Tiezhu Yang --- gdb/syscalls/update-linux.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/syscalls/update-linux.sh b/gdb/syscalls/update-linux.sh index e2af1a75cb5..da8082d6488 100755 --- a/gdb/syscalls/update-linux.sh +++ b/gdb/syscalls/update-linux.sh @@ -62,10 +62,15 @@ EOF echo '#include ' \ | gcc -E - -dD "$@" \ - | grep -E '#define __NR_' \ + | grep -E '#define (__NR_|__NR3264_)' \ | while read -r line; do - name=$(echo "$line" | awk '{print $2}' | sed 's/^__NR_//') - nr=$(echo "$line" | awk '{print $3}') + line=$(echo "$line" | awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { + sub("^#define __NR(3264)?_", ""); print | "sort -k2 -n"}') + if [ -z "$line" ]; then + continue + fi + name=$(echo "$line" | awk '{print $1}') + nr=$(echo "$line" | awk '{print $2}') echo " " done From patchwork Tue Nov 26 08:59:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 101881 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 4E4BD3857712 for ; Tue, 26 Nov 2024 09:00:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E4BD3857712 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 550003857C5F for ; Tue, 26 Nov 2024 08:59:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 550003857C5F 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 550003857C5F 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=1732611564; cv=none; b=lyQMFA63xQ7o5gXRBEvGCMm2o2uRwoKWNP4n26XTku5XyNuR+6oPtiZ/8knvSKibZlf1JCFBC7184nMqa8SZWDNRoNRXIGBsxrdux1f4NljNdWU3s3LR1yO5g6Tv5sSLPKRdGUgbqxp8XMMNAxz0ZApwXpDGVxKjVYog3lAoKok= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732611564; c=relaxed/simple; bh=ex0pr5aJ/mXWkjByPTwafSClg5975VWlIR57anwyVIE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Z5TzyWD3bYOpD+nDqfcYv2a5isNY4f/N6tFwYeTenuJGAW3dV7ukobeXpUUhpEX5Pre9W4NG/hR70IhV24k8/2/DiCVrNTTbQMbufTGeLCUmqaoTLet9hKCCY6VmG+M110yaCTugRdHAuAPox6jjl6FvT/LbePl/+MW/Bl+jJ80= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 550003857C5F Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxQK_pjUVnlgBJAA--.52957S3; Tue, 26 Nov 2024 16:59:21 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by front1 (Coremail) with SMTP id qMiowMCxfcLijUVngFhoAA--.5123S4; Tue, 26 Nov 2024 16:59:20 +0800 (CST) From: Tiezhu Yang To: gdb-patches@sourceware.org Subject: [PATCH 2/3] gdb: syscalls: Remove tips for LoongArch xml files Date: Tue, 26 Nov 2024 16:59:11 +0800 Message-ID: <20241126085912.30599-3-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20241126085912.30599-1-yangtiezhu@loongson.cn> References: <20241126085912.30599-1-yangtiezhu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: qMiowMCxfcLijUVngFhoAA--.5123S4 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoWxAr17Gw47Kw4DCr17uF43XFc_yoW5Kw15pF sIvrW7Kr1fKr18CrnrWrn0grnavrsrGF13WF12k3yrArWUXw1rtw4DWa4rCa47J39IvFWj qF48Jry5uFWjgacCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07UNvtZUUUUU= X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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 For now, there is no need to do special handling when generating xml file for LoongArch, just remove the tips in the file comment. Signed-off-by: Tiezhu Yang --- gdb/syscalls/loongarch-linux.xml | 24 +----------------------- gdb/syscalls/loongarch-linux.xml.in | 23 +---------------------- 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/gdb/syscalls/loongarch-linux.xml b/gdb/syscalls/loongarch-linux.xml index 6e85dbd7166..91e7bbc9691 100644 --- a/gdb/syscalls/loongarch-linux.xml +++ b/gdb/syscalls/loongarch-linux.xml @@ -9,29 +9,7 @@ - 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. - - - - - - - - - - ---> + The file mentioned above belongs to the Linux Kernel. --> diff --git a/gdb/syscalls/loongarch-linux.xml.in b/gdb/syscalls/loongarch-linux.xml.in index cf38f311abe..e6e17b3f2b6 100644 --- a/gdb/syscalls/loongarch-linux.xml.in +++ b/gdb/syscalls/loongarch-linux.xml.in @@ -11,29 +11,8 @@ - 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. - - - - - - - - - - ---> From patchwork Tue Nov 26 08:59:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 101882 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 74E243857705 for ; Tue, 26 Nov 2024 09:01:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74E243857705 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 209E63857BA3 for ; Tue, 26 Nov 2024 08:59:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 209E63857BA3 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 209E63857BA3 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=1732611568; cv=none; b=fVdmV5npSgrp9JSzvqaTOC3QivDWsNAjM78NTxOpgdKl7fD7X6z0b7oi5nM5QCIY1GgmifzxdZJNiZgMoeFe5V+J1QA+GulWLsqkDYGm5IddMI7hEl24rPEl66/rjHsyrPBUjGhLPkoLVC/CjboZp9x9OLU1rYl8ixLTk9SxQto= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732611568; c=relaxed/simple; bh=c5ptQ2p4dLtmlJ71aXdBFKBnsXE/APSsKs3bnmDxjag=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Rl5h4eBLv3jVgf2W0XclzFmMJgB2XHhsDH5gAojMKr7zDmg/6+COUuJUJz2Hh2VT1jTHCYJ35HLHocvodupkTZY+PFR0G83DlP8QASDN8sxleqZmi4Tc1H/EOPG16AP6y5Cfd9kMrKRpsRL7XtasYsHF39EZFiqJjtH2ZFL4DeQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 209E63857BA3 Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8BxuuDtjUVnlwBJAA--.12766S3; Tue, 26 Nov 2024 16:59:25 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by front1 (Coremail) with SMTP id qMiowMCxfcLijUVngFhoAA--.5123S5; Tue, 26 Nov 2024 16:59:21 +0800 (CST) From: Tiezhu Yang To: gdb-patches@sourceware.org Subject: [PATCH 3/3] gdb: syscalls: Update LoongArch xml files Date: Tue, 26 Nov 2024 16:59:12 +0800 Message-ID: <20241126085912.30599-4-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20241126085912.30599-1-yangtiezhu@loongson.cn> References: <20241126085912.30599-1-yangtiezhu@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: qMiowMCxfcLijUVngFhoAA--.5123S5 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoWxuF1kCr4kGFWrtr4xCr4kuFX_yoWrXw4fpF sIyw4DJr4fur18Ar13uw4jgr97ZFn8Gr1agF12yrW5ArWDXr1YqrsrWa47Jr9rAwnI9FWj qF48try5CF4jgacCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07UNvtZUUUUU= X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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 There are some new syscalls in the latest upstream Linux kernel, update the xml files for LoongArch to reflect the reality. 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, then make use of the command "make" to generate loongarch-linux.xml from loongarch-linux.xml.in. Like this: $ git clone https://sourceware.org/git/binutils-gdb.git gdb.git $ cd gdb.git/gdb/syscalls/ $ ./update-linux.sh loongarch-linux.xml.in $ make Note that the system headers may be different with the upstream headers of Linux kernel, it is better to copy the upstream headers into the system headers when generating loongarch-linux.xml.in. /usr/include/asm-generic/unistd.h -- include/uapi/asm-generic/unistd.h /usr/include/asm/unistd.h -- arch/loongarch/include/asm/unistd.h Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7697a0fe0154 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ff388fe5c481 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6140be90ec70 Signed-off-by: Tiezhu Yang --- gdb/syscalls/loongarch-linux.xml | 9 ++++++++- gdb/syscalls/loongarch-linux.xml.in | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gdb/syscalls/loongarch-linux.xml b/gdb/syscalls/loongarch-linux.xml index 91e7bbc9691..3085da173e8 100644 --- a/gdb/syscalls/loongarch-linux.xml +++ b/gdb/syscalls/loongarch-linux.xml @@ -89,6 +89,8 @@ + + @@ -323,5 +325,10 @@ - + + + + + + diff --git a/gdb/syscalls/loongarch-linux.xml.in b/gdb/syscalls/loongarch-linux.xml.in index e6e17b3f2b6..3172a45baf2 100644 --- a/gdb/syscalls/loongarch-linux.xml.in +++ b/gdb/syscalls/loongarch-linux.xml.in @@ -93,6 +93,8 @@ + + @@ -327,5 +329,10 @@ - + + + + + +