From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27888 invoked by alias); 12 Feb 2014 17:37:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27875 invoked by uid 89); 12 Feb 2014 17:37:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2014 17:37:14 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N0W00L008WY2600@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Wed, 12 Feb 2014 19:37:11 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0W00LZZ8XZ0K10@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Wed, 12 Feb 2014 19:37:11 +0200 (IST) Date: Wed, 12 Feb 2014 17:37:00 -0000 From: Eli Zaretskii Subject: GDB 7.7 crashes on LTO-built executable To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83lhxgs05d.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00426.txt.bz2 I compiled a simple test program with -flto using MinGW GCC 4.7.2, and tried to debug it with GDB 7.7. However, "info source" crashed with SIGSEGV. It turns out that source_info was trying to output this line: printf_filtered (_("Compiled with %s debugging format.\n"), s->debugformat); and s->debugformat was a NULL pointer. Looking around, it sounds like when GDB iterates over objfiles, it gets a weird file name, something like $TMPDIR/ccN8FPgQ.ltrans0.o, instead of the expected name of the (single) object file name for this program. The real objfile then ends up with a NULL pointer instead of its debugformat field. Is this expected with LTO programs? Is there a better way than saying "unknown" when s->debugformat is NULL? TIA