From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id B248F3858410 for ; Mon, 8 May 2023 17:24:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B248F3858410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4QFSnw1Ljrz40Qs; Mon, 8 May 2023 17:24:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QFSnw0WnYz3mN6; Mon, 8 May 2023 17:24:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683566660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1TK2CuyD9ky4oEWCHRNlmLIjbj5w8EbQr8z8mBNcr88=; b=V9Vl5PatSe9jGoARYctEHOUqmDDEhV5MKnSWRIpjaxzH2rPO6NmJNIG0NrP1kx3bb2AR+i h8E5PgpcvODA0TOEr3DILSen/ss52F3P0bjzU6caCKj+I9HgjNb8C4u7b/DY1IyF97FV7K zCiBafNipFghmZD0vmCZ66L3G8Bw8JQTioESDMzuplNusvhvBJJtngwdB3NvU8jnhk57xy O4rZwSQLOhU2GIvOcpoK/gOJlSWGEYubb1lbn7X+DIfCUQ9ob8GjzxKHKfKJOephlCI4c8 vZrHw7vItrah0JHmHmEjYFscBhc7vjW7cw9J7jtWf2VYLA6SgAIo4YBRIoSU9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683566660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1TK2CuyD9ky4oEWCHRNlmLIjbj5w8EbQr8z8mBNcr88=; b=mVfJXGX8GbIQXhHTGRtJqfuZmJhP79FlL4L5c6Yt9btBVzdv1gWhl0+K7unHofU35Vh5Ys iw02eXi6k4i6H/y5yYkio8tvyvZGoXAj2iuzY08eyJeXvR9dGQ5J0tOoyHgimXZBc4U9S0 huzHuI2IjjE8sCKH78FNP9t6Wh1HMrzIvFnwSP9eI/9IumfTIH2Y0uf+iQDLZj54Ag8pf/ 34JxKvEO8uqN1KyFXGEQqRox/W7Itr/Im4vw7yT90szfnu/PUr6voJlk2rZJdj70ukPLYN 2TV52bVzW+mGi0W44wHNdeMBDXUf0+RNxfCKbVC1RJePYNvcsjdRBtw/NWQZfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683566660; a=rsa-sha256; cv=none; b=HTxQhlEMQTMsg2AnXFzURJG8zyu4Dq3aLnYpnzHmzWf8LtQ3kGtXltk86cZV5cxkdVusUR k7GSEOAflYBP6HjHCegRN4fl3non2FEKqGCDFm6VaoC8blRSDzjgFcIBLXV+FXUgvV6z81 tnJWcpLhy6UckOfUHOqF8ZvlV2/iWZAvZ4v5G8xrcTBLzwNkDSp+ABw5hayTgpsm/cFLcT 8g6PE/nKyykeVOPQv4UhWfGpZ4cH7q60wRq8gXIQUzouu3opuuyOTHVdpy/x6ioI2Rf6pV MjuPDqVjcZUqeFy7UtOxFmYxqw6iZj1a5AteVnpzw1jzBBQQrW9Q+ilkvej9Rg== Received: from [IPV6:2601:648:8680:16b0:9597:2b45:6d3:31cd] (unknown [IPv6:2601:648:8680:16b0:9597:2b45:6d3:31cd]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QFSnv4qtRzxF6; Mon, 8 May 2023 17:24:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <9a8e9750-ff47-9570-b504-9357256d20e2@FreeBSD.org> Date: Mon, 8 May 2023 10:24:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v5 08/19] *-linux-nat: Handle null inferior in read_description. Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20230427210113.45380-1-jhb@FreeBSD.org> <20230427210113.45380-9-jhb@FreeBSD.org> <6aa05767-b4bb-9388-0866-2366dfa61720@simark.ca> From: John Baldwin In-Reply-To: <6aa05767-b4bb-9388-0866-2366dfa61720@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 List-Id: On 5/3/23 9:38 AM, Simon Marchi wrote: > On 4/27/23 17:01, John Baldwin wrote: >> Don't invoke ptrace in the target read_description method if there is >> not an active inferior to query via ptrace. Instead, use the default >> register set for the architecture. > > Since this fixes a user-visible problem, can you please update the > commit message to indicate what this is fixing? If I remember > correctly: > > (gdb) target native > Done. Use the "run" command to start a process. > (gdb) unset tdesc filename > Couldn't get CS register: No such process. > > And you could include the equivalent in the previous commit (the one > that fixes it for fbsd), I guess you get a slightly different error > there? Yep, fixed. > It would also be nice to have a test for this, which would ensure that > the "unset tdesc filename" command outputs nothing. I've added one in a followup commit locally. -- John Baldwin