From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 572BE3858D1E for ; Tue, 14 Feb 2023 17:27:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 572BE3858D1E 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-x134.google.com with SMTP id v6so1579361ilc.10 for ; Tue, 14 Feb 2023 09:27:39 -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=hrMydxRoO60bDZHQE/TvhjmLdfAC+kPrzUuc8vKJCYo=; b=UnXWL+AxotncFv713uNGJNXtACEV1hR23MF55WkB2KhkeMs3Vj2ihjmmMcqyWKv2mR kBfDr2E8Mw+QP/utGKhk6azhNyfEsCkVBMIXs5tRdw8+cJgHEfWk65OXh72anDm4WEKQ 4UuoNJ01DAztoEjXakWgSu4arVna1VJXAdhewl9eZIY7DjGwp2nuJ4CO3+2/NRG829uQ yoUPOcxMy0+G3cvuIkrj0Vr2cnuKO4sGxBNw8Ays1UGnqVAKVzKc7eJi3nntlhm2egXp ORN8w+8LdnpVjzfKlf+vqTUPosIIRDT551AH7lbDY3GeW1POiZHjjpW0UjejoJQsTu6a m8bw== 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=hrMydxRoO60bDZHQE/TvhjmLdfAC+kPrzUuc8vKJCYo=; b=KiLZHEANY6bNu1Dc2DxY1ECJTcmUJaJ351KtJGUtwh/QJbI60pTz4Mw/BU4WCzqmOS 57aOBorfp5DKeTu/FJKKlX3TVnmXo6t+QM+Kz77ZUNcLNkokEf3r2urUxH2JCua19Its f/83rHtJFBZue2+u86RnFUqB5a+2Zb1S2KGzvFMBbR0ImFBMjiiqOr6nOEigEfcSF0Ie LKRDK3EDmMmtizE4nnNPspWhao9G4FrnLbu5TrjOUGZXbBvB3t2WzUeJs/B9rd/dwheC EwQBSyQBJ2P5cmA7sFJfHd/sQqTJV7wtRRVm+5swn7wZrrsjZvlTzFGWpCc1oN5QUKSs ZAHw== X-Gm-Message-State: AO0yUKX4Ej1ZeezNF9UxUYOLf/cW0u/iE0yNE4qa7jyty27ro0H2zS8T LLV5mMElUB4xZhE2qp/bs5RLDLMFhyE0IRQZ X-Google-Smtp-Source: AK7set9es0Svoxi7rcCiezyK0s+z3MioKGxjBhP8b3iZRg95c+UWZInx16A04hJ5LqWRwDbf1ThpuQ== X-Received: by 2002:a05:6e02:1b88:b0:315:459a:8bd with SMTP id h8-20020a056e021b8800b00315459a08bdmr3972419ili.25.1676395657587; Tue, 14 Feb 2023 09:27:37 -0800 (PST) Received: from murgatroyd (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id h17-20020a92d851000000b00313d32f8345sm2667112ilq.66.2023.02.14.09.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 09:27:37 -0800 (PST) From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey via Gdb-patches , Tom Tromey Subject: Re: [PATCH] Do not record a rejected target description References: <20230112193356.1133696-1-tromey@adacore.com> <87bklwmenh.fsf@redhat.com> X-Attribution: Tom Date: Tue, 14 Feb 2023 10:27:36 -0700 In-Reply-To: <87bklwmenh.fsf@redhat.com> (Andrew Burgess's message of "Tue, 14 Feb 2023 15:48:34 +0000") Message-ID: <875yc4tawn.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: >>>>> "Andrew" == Andrew Burgess writes: >> info.target_desc = tdesc_info->tdesc; >> if (!gdbarch_update_p (info)) >> - warning (_("Architecture rejected target-supplied description")); >> + { >> + warning (_("Architecture rejected target-supplied description")); >> + tdesc_info->tdesc = nullptr; >> + } Andrew> This seems fine, but it is possible that an exception could take us out Andrew> of this function too, for example, a misbehaving remote target can cause Andrew> target_read_description_xml to throw an exception. I guess that any of Andrew> the issues you were originally seeing would also trigger if we throw an Andrew> exception. I don't think this can really happen, because that call is part of the assignment to the field in question: if (tdesc_info->tdesc == nullptr) tdesc_info->tdesc = target_read_description (current_inferior ()->top_target ()); So, if it does throw, the tdesc_info won't be updated. Tom