From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CAEF63858C2A; Fri, 8 Dec 2023 18:10:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAEF63858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702059023; bh=tp2hJJfqLUacjdy7ijRoMHRi6bTmwsjvQQfv50MPuXQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nUMpVYlma0Auo4N6nuV1J++GJT/SfEBVOsoNFY1X2tXKL0qcN/kamvx5R9wcpE+07 4qkA8mmQLm2fAZwSrx+04+SFQqrs4dOFYDhbIblehILjZh+6HI43eufLH04IkTaeDy V4BD4FqqsXURHmybiUpCArp8g03kFM9ON/3gC0Gc= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug c++/31128] gdb crashes when trying to print a global variable stub without a running inferior Date: Fri, 08 Dec 2023 18:10:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31128 --- Comment #2 from Sourceware Commits --- The gdb-14-branch branch has been updated by Hannes Domani : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dbc23ea51f8a8= 3e9524dfb553baa8baacb29e68a9 commit bc23ea51f8a83e9524dfb553baa8baacb29e68a9 Author: Hannes Domani Date: Fri Dec 8 19:06:14 2023 +0100 Fix printing of global variable stubs if no inferior is running Since 3c45e9f915ae4aeab7312d6fc55a947859057572 gdb crashes when trying to print a global variable stub without a running inferior, because of a missing nullptr-check (the block_scope function took care of that check before it was converted to a method). With this check it works again: ``` (gdb) print s $1 =3D ``` Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31128 Approved-By: Tom Tromey (cherry picked from commit 576745e26c0ec76a53ba45b20af464628a50b3e4) --=20 You are receiving this mail because: You are on the CC list for the bug.=