From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 3BD993858D1E for ; Tue, 14 Feb 2023 15:16:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BD993858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x136.google.com with SMTP id n2so6360380ili.11 for ; Tue, 14 Feb 2023 07:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zbCQ6XCV5t5fpWWrdHj0arc5hfGkit/OytDEXZav4TM=; b=ZxXydPYWXLsms6P5a/H9Yt5RkDjgyXfUXUHqDJNDWry3gZ0ei4HDsVHecxwzGP0yRj BdkpTQm3jWGiEOCP//MEd9tF3RvKH5Vk/PHAxildKGHAtJxDIlF6BPk6Qp7fS0zMfFDB UENShzWrawQoKhzaPV/jVisIXUOhKVL4SsHXloe69/GdVA3eYVOdIWUOR2zDA4J4HGS6 QRTJ+vVparpKWzXpbZQgYCiw6och/7iY8a+pThWIOkHvViQmoknAJc7YEJoPPFbg7w8/ TdvF+6U18oXiLXWQs9DfthrEZzcs9TDanuJ+RohruD6qULlfyCHGyX9CX7dwtx+xdRvZ eaRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zbCQ6XCV5t5fpWWrdHj0arc5hfGkit/OytDEXZav4TM=; b=7oRVwFb0cHToCqrFp098oINpT2lta1XIsMhLbLQXyecYM1onuJPz/XXL1MVWsw2KiC +gDRGTUX7W8wESyyAXPXNBgSMr6ao9JEq1R4iHrjwB1+XEE3cNwySg5bydJBAspEiBFe E2BCCFT+kcp3P87YnODlJMy/m2GQQ5bw61Y9YsEryzAWqtqAAIelLJsppgAnihh7WJxX OCXvbPVnaqzBNiSscEzd1jQM1XGcLrztIik6T9aOA+hhmptU+wspnlhG0RwxX+tzwbYp swjgbOKXMoSGx3gyCdr9ooPQzZLCXy3nDOzjKbKOUMcjpBX29cPfTrN9UD+rB+mGCpEn GC8g== X-Gm-Message-State: AO0yUKXT1gW6BiOiTAR4b1YbncY1x9mB66asa38n225n4ZdSZB79pgjY n9auqWdXq94uiWWXC5iRZ7t4HSQX5pWbKGC5 X-Google-Smtp-Source: AK7set+dYLdow+373qj03s4a2zdi4FpYh6uUrd/bfYXeNrGw8gdwLxpuMtL+8uwwCqZI+ldzNS4Vkg== X-Received: by 2002:a92:7413:0:b0:313:d862:2069 with SMTP id p19-20020a927413000000b00313d8622069mr2547885ilc.19.1676387767459; Tue, 14 Feb 2023 07:16:07 -0800 (PST) Received: from murgatroyd (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id k27-20020a02ccdb000000b003c2bb1bd5a4sm4726937jaq.34.2023.02.14.07.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 07:16:07 -0800 (PST) From: Tom Tromey To: Tom Tromey via Gdb-patches Cc: Tom Tromey Subject: Re: [PATCH] Do not record a rejected target description References: <20230112193356.1133696-1-tromey@adacore.com> X-Attribution: Tom Date: Tue, 14 Feb 2023 08:16:06 -0700 In-Reply-To: <20230112193356.1133696-1-tromey@adacore.com> (Tom Tromey via Gdb-patches's message of "Thu, 12 Jan 2023 12:33:56 -0700") Message-ID: <877cwkuvk9.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,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 List-Id: >>>>> "Tom" == Tom Tromey via Gdb-patches writes: Tom> When connecting to a certain target, gdb issues a warning about the Tom> target description: Tom> (gdb) target remote localhost:7947 Tom> Remote debugging using localhost:7947 Tom> warning: Architecture rejected target-supplied description Tom> If you then kill the inferior and change the exec-file, this will Tom> happen: Tom> (gdb) file bar Tom> Architecture of file not recognized. Tom> After this, debugging doesn't work very well. Tom> What happens here is that, despite the warning, Tom> target_find_description records the downloaded description in the Tom> target_desc_info. Then the "file" command ends up calling Tom> set_gdbarch_from_file, which uses that description. Tom> It seems to me that, because the architecture rejected the Tom> description, it should not be used. That is what this patch Tom> implements. We've been using this internally with our misbehaving target and it is fine, but I'd appreciate someone else's review. thanks, Tom