From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 0E6A53857004; Mon, 8 Aug 2022 16:06:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E6A53857004 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix regression from gdbarch registry change X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: e441b55e94c905c6ee4417be3e5d88021d9c5aa6 X-Git-Newrev: ce81f9d6fa885a3faa41613debc8771304dc469b Message-Id: <20220808160648.0E6A53857004@sourceware.org> Date: Mon, 8 Aug 2022 16:06:48 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2022 16:06:48 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dce81f9d6fa88= 5a3faa41613debc8771304dc469b commit ce81f9d6fa885a3faa41613debc8771304dc469b Author: Tom Tromey Date: Mon Aug 8 09:56:47 2022 -0600 Fix regression from gdbarch registry change =20 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. =20 I managed to reproduce the bug with a riscv-elf build and then verified that this fixes the problem. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29449 Diff: --- 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