From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15557 invoked by alias); 1 Sep 2012 08:17:18 -0000 Received: (qmail 15545 invoked by uid 22791); 1 Sep 2012 08:17:15 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_NIX_SPAM,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Sep 2012 08:16:58 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M9N00I00VC7DV00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 01 Sep 2012 11:16:41 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M9N00IJ1WBRE030@a-mtaout22.012.net.il>; Sat, 01 Sep 2012 11:16:39 +0300 (IDT) Date: Sat, 01 Sep 2012 08:17:00 -0000 From: Eli Zaretskii Subject: Re: PATCH: error reading variable: value has been optimized out In-reply-to: <504092C0.2000602@broadcom.com> To: Andrew Burgess Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com Reply-to: Eli Zaretskii Message-id: <83harip386.fsf@gnu.org> References: <50376F3B.1080407@broadcom.com> <20120826171840.GA21205@host2.jankratochvil.net> <504092C0.2000602@broadcom.com> X-IsSubscribed: yes 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 X-SW-Source: 2012-09/txt/msg00000.txt.bz2 > Date: Fri, 31 Aug 2012 11:32:32 +0100 > From: "Andrew Burgess" > cc: "Jan Kratochvil" > > On 26/08/2012 6:18 PM, Jan Kratochvil wrote: > > I agree with the fix but it should have GDB-testsuite compatible testcase. > > Also FYI it is only for backward compatibility with old GCCs. > > Included a test case (below) that covers 4 different cases, all of > which are currently broken in different ways. Thank you for doing this. > [...] but as gcc is no longer creating examples like this I think we can accept the more limited solution I originally suggessted, if that's ok. "No longer creating" since what version of GCC? I don't think we should drop use cases just because they are only possible on past (old) versions of GCC. GDB is not limited to debug programs created only by latest GCC versions. I happen to still use a very old version of GCC (because it is stable and fast, and because I rarely need C++), and would very much like to have better debugging abilities for optimized code than what I have now. TIA