From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13162 invoked by alias); 10 Apr 2014 16:58:19 -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 13150 invoked by uid 89); 10 Apr 2014 16:58:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Apr 2014 16:58:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3AGwGSY019762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Apr 2014 12:58:16 -0400 Received: from barimba (ovpn-113-179.phx2.redhat.com [10.3.113.179]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s3AGwFX1032753 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 10 Apr 2014 12:58:16 -0400 From: Tom Tromey To: Keith Seitz Cc: "gdb-patches\@sourceware.org ml" Subject: Re: [RFA] Fix c++/16597 (crash when inspecting lambda expression variables) References: <532C7A56.8010201@redhat.com> Date: Thu, 10 Apr 2014 16:58:00 -0000 In-Reply-To: <532C7A56.8010201@redhat.com> (Keith Seitz's message of "Fri, 21 Mar 2014 10:43:50 -0700") Message-ID: <8738hlqfyw.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-04/txt/msg00185.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> That was the easy part. The not-so-easy/questionable part is the test Keith> case, which uses the (assembler) output of the compiler to run Keith> against. Writing by hand is very time-consuming and tricky, because we Keith> must be stopped inside the lambda function in order to trigger the Keith> bug. Keith> In any case, I thought I would submit this and see if anyone had any Keith> better ideas. I think it's fine to do this. In the past we've done two additional things that make it slightly nicer. First, we've checked in the original source file as a separate file, I think along with a note in the .exp about it. This approach lets you avoid this: Keith> +# WARNING: This is hard-coded from the original source file! This Keith> +# breakpoint should be set inside the lambda in A::doit(). ... since you can refer to comments in the original source file IIRC. Second, I think we've edited the compilation directory in the .S file, and maybe other little details as well (I had to edit the files to avoid 'main' for some reason I cannot remember): Keith> +.Linfo_string2: Keith> + .asciz "/home/keiths/tmp/16597" You can easily find some examples in gdb.dwarf2, just follow one of those. Tom