From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41E773858CD1; Fri, 8 Dec 2023 18:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41E773858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702058615; bh=9prMJnikoDk1jH4Cpv37ARkP7TPUOsOzvGjSPwexa9M=; h=From:To:Subject:Date:From; b=H099yN1o+Hakc4QS3flAm78KAn+OD2/Tbw7WbnY5ZqRnpYrFegWYePvXtpkc5jnwy nuja7k0pPrWRDZ7jwhHsceE6R2jeI/avyZEzhdlX5ltZclNjFpehKYMRmY14jtFQXt zKc+OLB83iIdBytYTzrJn/k/90QGyHLUUDLOziQo= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug c++/31128] New: gdb crashes when trying to print a global variable stub without a running inferior Date: Fri, 08 Dec 2023 18:03:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: ssbssa at sourceware dot 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 31128 Summary: gdb crashes when trying to print a global variable stub without a running inferior Product: gdb Version: 14.1 Status: NEW Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: ssbssa at sourceware dot org Target Milestone: --- It can be reproduced with this source: ``` struct S { S (int); virtual ~S (); int m_i; }; S s (5); int main () { return 0; } ``` And then just debugging the compiled object file: ``` $ g++ -g -c print-global-stub.cc $ gdb -q print-global-stub.o Reading symbols from print-global-stub.o... (gdb) p s This application has requested the Runtime to terminate it in an unusual wa= y. Please contact the application's support team for more information. ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=