[0/2] Autogenerate gdb/syscalls/linux-defaults.xml.in (syscall groups) from strace sources
Message ID | 20230224232650.4031472-1-pedro@palves.net |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 6BAA738555A0 for <patchwork@sourceware.org>; Fri, 24 Feb 2023 23:27:08 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by sourceware.org (Postfix) with ESMTPS id 2738D385B507 for <gdb-patches@sourceware.org>; Fri, 24 Feb 2023 23:26:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2738D385B507 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f53.google.com with SMTP id l2-20020a05600c1d0200b003e1f6dff952so3413470wms.1 for <gdb-patches@sourceware.org>; Fri, 24 Feb 2023 15:26:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=45PzYEvdZYlrXSCsKLtt0IC/WgCgYUqZh1U9k4rsYtI=; b=RqFyRKCzXzFIUj+r8QmZlpgHKLBIlsSuHWHO3erkIN8yyrBIx5BOsDhXWbst9q3rqq 5DYbSuSvKkOet36nPVhmi/ANZmScPkHgj8Dv4FEKOB0tyWr4pfNcAc2OTdqYsRsiI8C2 Nw5M59NWU3n8O8U+oigXb6xhpUIJHhoUokkl1+DRgzwXKxA1Lk8rNNl+X+V0xg0QKp2B BtcA55qxQ7XlgSGPsxjVaE+TgSxskucMiar8IxhjwcZgmZ3P0BVAXydck20ra2wg9q+C rISUFr7lw0fvHzRBx0LCovSNevOgyZrum+cTBtutXHeFsEojaYNnQTg9JLjy7Ot4Anv4 nfPw== X-Gm-Message-State: AO0yUKU8h+jmfq7I6SvOASbNA4rC2E3J6saN0LfvJjVZENOKudNvtpBA 2LiY5Fl2d+mASbrF2uVy0wvObXrzYyKOPg== X-Google-Smtp-Source: AK7set8ZYaV/KMxwYFcqYbj/OgiuEKLXkwbAXHQ+JoA+ro6sJRT/T6DOXXyZUCWACTuv9ZI6jz3dyw== X-Received: by 2002:a05:600c:990:b0:3eb:2f3b:4478 with SMTP id w16-20020a05600c099000b003eb2f3b4478mr553253wmp.15.1677281213171; Fri, 24 Feb 2023 15:26:53 -0800 (PST) Received: from localhost ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id fm16-20020a05600c0c1000b003dd1bd0b915sm4368091wmb.22.2023.02.24.15.26.51 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Feb 2023 15:26:51 -0800 (PST) From: Pedro Alves <pedro@palves.net> To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Autogenerate gdb/syscalls/linux-defaults.xml.in (syscall groups) from strace sources Date: Fri, 24 Feb 2023 23:26:48 +0000 Message-Id: <20230224232650.4031472-1-pedro@palves.net> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Autogenerate gdb/syscalls/linux-defaults.xml.in (syscall groups) from strace sources
|
|
Message
Pedro Alves
Feb. 24, 2023, 11:26 p.m. UTC
While working on the step-over-thread-clone/exit series, I noticed that one of the new tests was failing. The test does "catch syscall clone", and expects that pthread_create calls clone. Turns out that on the glibc shipped with Ubuntu 22.04, pthread_create calls clone3, not clone. To make the test cope with that, I thought of switching it to "catch syscall group:process". Surprisingly, that catches "clone", but not "clone3". This series fixes that, by adding a script that extracts the syscall group info out the strace sources. Pedro Alves (2): Autogenerate gdb/syscalls/linux-defaults.xml.in (groups) from strace sources Regenerate Linux syscall group info gdb/syscalls/aarch64-linux.xml | 26 +- gdb/syscalls/amd64-linux.xml | 106 ++--- gdb/syscalls/arm-linux.xml | 26 +- gdb/syscalls/bfin-linux.xml | 26 +- gdb/syscalls/i386-linux.xml | 124 +++--- gdb/syscalls/linux-defaults.xml.in | 545 ++++++++++++++++---------- gdb/syscalls/mips-n32-linux.xml | 122 +++--- gdb/syscalls/mips-n64-linux.xml | 100 ++--- gdb/syscalls/mips-o32-linux.xml | 122 +++--- gdb/syscalls/ppc-linux.xml | 124 +++--- gdb/syscalls/ppc64-linux.xml | 104 ++--- gdb/syscalls/s390-linux.xml | 122 +++--- gdb/syscalls/s390x-linux.xml | 102 ++--- gdb/syscalls/sparc-linux.xml | 114 +++--- gdb/syscalls/sparc64-linux.xml | 94 ++--- gdb/syscalls/update-linux-defaults.sh | 95 +++++ 16 files changed, 1096 insertions(+), 856 deletions(-) create mode 100755 gdb/syscalls/update-linux-defaults.sh base-commit: 2e977d9901393ea1bacbe1896af0929e968bc811
Comments
On 2/25/23 00:26, Pedro Alves wrote: > While working on the step-over-thread-clone/exit series, I noticed > that one of the new tests was failing. The test does "catch syscall > clone", and expects that pthread_create calls clone. Turns out that > on the glibc shipped with Ubuntu 22.04, pthread_create calls clone3, > not clone. To make the test cope with that, I thought of switching it > to "catch syscall group:process". Surprisingly, that catches "clone", > but not "clone3". > > This series fixes that, by adding a script that extracts the syscall > group info out the strace sources. > If I understand correctly, this is orthogonal to update-linux-from-src.sh ? [ FWIW, i've just ran update-linux-from-src.sh with linux kernel sources v6.2, and there where no changes. ] Thanks, - Tom > Pedro Alves (2): > Autogenerate gdb/syscalls/linux-defaults.xml.in (groups) from strace > sources > Regenerate Linux syscall group info > > gdb/syscalls/aarch64-linux.xml | 26 +- > gdb/syscalls/amd64-linux.xml | 106 ++--- > gdb/syscalls/arm-linux.xml | 26 +- > gdb/syscalls/bfin-linux.xml | 26 +- > gdb/syscalls/i386-linux.xml | 124 +++--- > gdb/syscalls/linux-defaults.xml.in | 545 ++++++++++++++++---------- > gdb/syscalls/mips-n32-linux.xml | 122 +++--- > gdb/syscalls/mips-n64-linux.xml | 100 ++--- > gdb/syscalls/mips-o32-linux.xml | 122 +++--- > gdb/syscalls/ppc-linux.xml | 124 +++--- > gdb/syscalls/ppc64-linux.xml | 104 ++--- > gdb/syscalls/s390-linux.xml | 122 +++--- > gdb/syscalls/s390x-linux.xml | 102 ++--- > gdb/syscalls/sparc-linux.xml | 114 +++--- > gdb/syscalls/sparc64-linux.xml | 94 ++--- > gdb/syscalls/update-linux-defaults.sh | 95 +++++ > 16 files changed, 1096 insertions(+), 856 deletions(-) > create mode 100755 gdb/syscalls/update-linux-defaults.sh > > > base-commit: 2e977d9901393ea1bacbe1896af0929e968bc811
On 2023-02-25 9:31 a.m., Tom de Vries wrote: > On 2/25/23 00:26, Pedro Alves wrote: >> While working on the step-over-thread-clone/exit series, I noticed >> that one of the new tests was failing. The test does "catch syscall >> clone", and expects that pthread_create calls clone. Turns out that >> on the glibc shipped with Ubuntu 22.04, pthread_create calls clone3, >> not clone. To make the test cope with that, I thought of switching it >> to "catch syscall group:process". Surprisingly, that catches "clone", >> but not "clone3". >> >> This series fixes that, by adding a script that extracts the syscall >> group info out the strace sources. >> > > If I understand correctly, this is orthogonal to update-linux-from-src.sh ? Right. This generates the linux-defaults.xml.in file, which is not generated by update-linux-from-src.sh. The groups info is not found in the kernel. linux-defaults.xml.in maps between syscall names and groups. The arch xml.in files map syscall number to name. The makefile combines each arch xml.in with linux-defaults.xml.in generating a final .xml file with maps the number to name, and to groups. > [ FWIW, i've just ran update-linux-from-src.sh with linux kernel sources v6.2, and there where no changes. ] Great, I was wondering whether we needed to re-run that with a recent kernel. Thanks for taking care of it. Pedro Alves