From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1EpLGaY08WLJ1CIAWB0awg (envelope-from ) for ; Mon, 08 Aug 2022 12:07:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 56BE91EA06; Mon, 8 Aug 2022 12:07:02 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=TBRLko9V; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B41831E9ED for ; Mon, 8 Aug 2022 12:07:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08CB93857007 for ; Mon, 8 Aug 2022 16:07:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08CB93857007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659974821; bh=jgeAHTkFrNq0fa/vnX6XLW/stl4PNlXV19c7XuD20K8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=TBRLko9VPQsFuuLTZwPeN7Z4yKH7iE2H4goHBcJOOYYBZz8tHiv/f/SWJjFR3ebat hXVSM1ueYrqaIRZ8lD4YyBWL0yqEVROWp1sIj91vROCcSRAB8ELrlyhZE+FUXXbhJg 7AauxycEufdRk9mfiEWZyWNFji1a6ifO6F+bBpwo= 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 3F636385735F for ; Mon, 8 Aug 2022 16:06:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3F636385735F Received: by mail-il1-x136.google.com with SMTP id p10so5110588ile.5 for ; Mon, 08 Aug 2022 09:06:40 -0700 (PDT) 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:cc :to:from:x-gm-message-state:from:to:cc; bh=jgeAHTkFrNq0fa/vnX6XLW/stl4PNlXV19c7XuD20K8=; b=d85tgAZX3EgkkKrZPvCl7+RJ5GCcxJBvg4JzfvI83ZujrDB5wR5upiqPlPXIox2QyD TsKtk/dFd/U7cEE9gcihkPcxmgCoVfUKhg7qgV5FrW+qipPKNfqatExdMsN08kKYytQT wej8jQ5WxOR1QBdDc4bXfnxquwp2PeAXUO0G/4e8BAQXM8R0gqjnDDhWAmHqFnWNcHQz 1cni6kYsJoF1XYB3s9R61l78IFG76R+5G9dm3Eno65K62+S7UQuooqX8K9kIlvL6UFvh avvbJPf7fWviuqF5nbmE36Xh8t/R66wa8fUjg8PKnHUS7F4iCDVHKKIYKh3+vE0jWiMd dW3Q== X-Gm-Message-State: ACgBeo1xnOTouNPFGvSkhe7dpEk6+ciMuPb0akdrO6adYl4/81vx6niQ ZjoQRbkk5TmDtgx1CysS/3dDXm/4Zfl8og== X-Google-Smtp-Source: AA6agR6kt6tBcYMgFWjT2Yr1893E7g2Z8gQBlihzWywY44dFYvsKYJnnSOKWZKmdus1LJTrA3F+nPw== X-Received: by 2002:a05:6e02:219d:b0:2de:813b:8587 with SMTP id j29-20020a056e02219d00b002de813b8587mr9094784ila.79.1659974799138; Mon, 08 Aug 2022 09:06:39 -0700 (PDT) Received: from murgatroyd.Home (71-211-185-228.hlrn.qwest.net. [71.211.185.228]) by smtp.gmail.com with ESMTPSA id q2-20020a05663810c200b00342a4cd3075sm5350861jad.122.2022.08.08.09.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 09:06:38 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [pushed] Fix regression from gdbarch registry change Date: Mon, 8 Aug 2022 10:06:33 -0600 Message-Id: <20220808160633.2296098-1-tromey@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Cc: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" The gdbarch registry patch introduced a regression that could cause a crash when opening files in gdb. The bug is that, previously, the solib ops would default to current_target_so_ops; but the patch changed this code to default to nullptr. This patch fixes the bug by reintroducing the earlier behavior. This is PR gdb/29449. I managed to reproduce the bug with a riscv-elf build and then verified that this fixes the problem. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29449 --- gdb/solib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/solib.c b/gdb/solib.c index d889673dabf..25adf586a02 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -64,7 +64,13 @@ static const registry::key