From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UF4uCiLLHmpsvC8AWB0awg (envelope-from ) for ; Tue, 02 Jun 2026 08:22:58 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=Q/IYctQU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F32571E0A3; Tue, 02 Jun 2026 08:22:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2F0241E062 for ; Tue, 02 Jun 2026 08:22:57 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2C4B4BA2E12 for ; Tue, 2 Jun 2026 12:22:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2C4B4BA2E12 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=Q/IYctQU Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1C63F4BA2E2E for ; Tue, 2 Jun 2026 12:22:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C63F4BA2E2E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C63F4BA2E2E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780402951; cv=none; b=S1CvhhXcy+GqoIGWINXaxik2io5KduEicX2yVm0cD4o1KBiO3364ESk3nBLu7jifQ1WvQlitW++OPB49jAv8UsNvOC285s5kGnmpIWcsoIOLCyoH7dLE4jrvAx4q7DuTIZDkxw6WwvABmY5UAF4my2+quqokqa+LZhwNGLGX398= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780402951; c=relaxed/simple; bh=i8fFaEN3vI5aGZsm2+mnBZu6a0vfVqvcKghjKmslhzM=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=VTjQcdGHABDH6pd6+2+wkeeZuqJoQw5eI67tnIUaZ1Hyeutw62j631Wnysvc+7OBDw4GbtQEGsnlOgSgqT2gXECQSV4spOnHJnUrpUvrdIXownqLfKkIa7BwRPjTk0YQwlaGk+VKBsI9Dm2fW3NxKCkWzp9vww0pbW7u/FEZ5Nw= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=Q/IYctQU DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C63F4BA2E2E Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUO8b-0003VI-In; Tue, 02 Jun 2026 08:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ed0Tq6Pxw8aV7ByLYWZRTPkvYzo2nlJlouVMijIebCE=; b=Q/IYctQUwuMW sTqB9pg19RRW1ln+kDe5DPwsSCua3EG2Z5mecrbdfeImbgVdHKauV8qZUKzWjxlhWNnKza9oWQ4jL IfiJPO0daEz4yvkN5CSKMFpqlv+yI9EPfJiowlKkyD9hXpaBs+LOODLI80AWZ8Fjk2eNkwjXyjTG1 TIzSLq+0zFILgoai9CUncRpMzWlw0EipZbVLdZVvj7GAX8TqJnqdwDmyqb4f/OMDrzNd895TnHoPq 9T9Z2aHOtDAS4DTZkQA8ZwVGIZ6DILNC1YZaN62ocOE8ws8y4JR3IjhdSF04B+4AfKj+/9my+tDf/ pEueBQa+c9XXlBGeuqZKqQ==; Date: Tue, 02 Jun 2026 15:22:26 +0300 Message-Id: <867bohw2rh.fsf@gnu.org> From: Eli Zaretskii To: Christina Schimpe Cc: gdb-patches@sourceware.org, hjl.tools@gmail.com, keiths@redhat.com In-Reply-To: <20260602111122.3187712-2-christina.schimpe@intel.com> (message from Christina Schimpe on Tue, 2 Jun 2026 11:11:21 +0000) Subject: Re: [PATCH 1/2] gdb: add maintenance set/show gcore xml-target-description command References: <20260602111122.3187712-1-christina.schimpe@intel.com> <20260602111122.3187712-2-christina.schimpe@intel.com> 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~public-inbox=simark.ca@sourceware.org > From: Christina Schimpe > Cc: hjl.tools@gmail.com, > keiths@redhat.com > Date: Tue, 2 Jun 2026 11:11:21 +0000 > > From: Felix Willgerodt > > This command will allow to enable/disable creating the NT_GDB_TDESC note > in corefiles. While GDB writes and reads this node, there aren't really many > other pieces of software that create this node (e.g. the Linux kernel doesn't). > To be able to test the code path in GDB that is used when NT_GDB_TDESC is not > there, add a maintenance command which tests can use to test both cases. > > Co-authored-by: Christina Schimpe > --- > gdb/NEWS | 6 ++++++ > gdb/doc/gdb.texinfo | 7 +++++++ > gdb/elf-none-tdep.c | 16 +++++++++------- > gdb/fbsd-tdep.c | 15 +++++++++------ > gdb/gcore.c | 40 ++++++++++++++++++++++++++++++++++++++++ > gdb/gcore.h | 3 +++ > gdb/linux-tdep.c | 15 +++++++++------ > 7 files changed, 83 insertions(+), 19 deletions(-) Thanks. > diff --git a/gdb/NEWS b/gdb/NEWS > index 7c8cf9af4c2..eef1924c9f0 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -97,6 +97,12 @@ AArch64 MinGW aarch64-*-mingw* > > * New commands > > +maintenance set/show gcore xml-target-description > + With this command you can control whether or not the generate-core-file > + command emits the NT_GDB_TDESC note. This is mainly useful for testing > + how GDB handles corefiles without this note, as not all software that > + creates corefiles generates it. > + If this command controls the emission of NT_GDB_TDESC note, then why its name mentions a more general XML target description? Am I right in assuming that NT_GDB_TDESC is just part of the target description? If so, perhaps the xml-target-description part should be renamed, or maybe the NEWS text should be modified to say that the entire target description is emitted as XML? > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -42077,6 +42077,13 @@ buffer. > Control whether @value{GDBN} will skip PAD packets when computing the > packet history. > > +@kindex maint set gcore xml-target-description > +@item maint set gcore xml-target-description > +@kindex maint show gcore xml-target-description > +@item maint show gcore xml-target-description > +Control whether @value{GDBN} will create the NT_GDB_TDESC note when using > +the @samp{generate-core-file} command. NT_GDB_TDESC should be in @code or @samp. > + add_setshow_boolean_cmd ("xml-target-description", class_obscure, > + &maint_gcore_emit_xml_tdesc, _("\ > +Set whether gcore emits a xml-target-description."), _("\ > +Show whether gore emits a xml-target-description."), _("\ > +By default, gcore emits the note NT_GDB_TDESC.\n\ > +Disabling this setting will cause gcore to no longer emit this note."), This doc string has the same issue: it say GDB will emit the XML target description, but then goes on to say that NT_GDB_TDESC note is emitted. Reviewed-By: Eli Zaretskii