From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22215 invoked by alias); 27 Mar 2012 14:31:29 -0000 Received: (qmail 22205 invoked by uid 22791); 27 Mar 2012 14:31:28 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Mar 2012 14:31:07 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2REUiw0029773 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Mar 2012 10:30:44 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2REUfoa025293 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 27 Mar 2012 10:30:43 -0400 Message-ID: <4F71CEF5.8030805@redhat.com> Date: Tue, 27 Mar 2012 14:31:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: "gdb-patches@sourceware.org ml" Subject: Re: [RFA 1/2] Linespec rewrite (update 2) References: <4F70F8F7.503@redhat.com> <20120327135623.GC2701@adacore.com> In-Reply-To: <20120327135623.GC2701@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-03/txt/msg00906.txt.bz2 On 03/27/2012 06:56 AM, Joel Brobecker wrote: > I tested your patch locally, and unfortunately, it regresses in > the following situation: > > (gdb) break ops.adb:"+":10 > FUNCTION:OFFSET is unimplemented > > It seems to be doing it for all operators, for instance: > > (gdb) break ops.adb:"/":25 > FUNCTION:OFFSET is unimplemented Yes, this is a new feature AFAICT. As far as I can tell, CVS HEAD is also not properly dealing with this linespec: cvs$ ./gdb -nx -q testsuite/gdb.ada/operator_bp/ops_test -ex 'break ops.adb:"+":10' -ex 'break ops.adb:"/":25' Reading symbols from testsuite/gdb.ada/operator_bp/ops_test...done. Breakpoint 1 at 0x401176: ops.adb:"+":10. (2 locations) Breakpoint 2 at 0x4011c8: file testsuite/gdb.ada/operator_bp/ops.adb, line 40. (gdb) inf br Num Type Disp Enb Address What 1 breakpoint keep y 1.1 y 0x0000000000401176 in ops."+" at testsuite/gdb.ada/operator_bp/ops.adb:25 1.2 y 0x000000000040136d in ops."+" at testsuite/gdb.ada/operator_bp/ops.adb:119 2 breakpoint keep y 0x00000000004011c8 in ops."/" at testsuite/gdb.ada/operator_bp/ops.adb:40 As you can see, the ":10" and ":25" were simply ignored. I've stepped through the code, and decode_variable will see "\"+\":10\n", but ada_name_for_lookup will return "+". From there on out, the ":10" is lost. Unless I'm missing something, this appears to be another special case of maintaining bug-for-bug compatibility. > I'll probably have some time to look at this this afternoon, if you're > tied up. How would you like me to fix this? > Git also notices the following little details when applying your > patch: > >> /home/brobecke/linespec-rewrite-parser-2.patch:810: trailing whitespace. >> /* Throw an appropriate error when an unexpected token is encountered >> /home/brobecke/linespec-rewrite-parser-2.patch:3180: trailing whitespace. >> /home/brobecke/linespec-rewrite-parser-2.patch:3960: trailing whitespace. >> { >> /home/brobecke/linespec-rewrite-parser-2.patch:4106: trailing whitespace. >> add the_tests "$srcfile:main:$x" invalid_label [string trim $x] "main" >> /home/brobecke/linespec-rewrite-parser-2.patch:4246: trailing whitespace. >> return f.baz (foo::bar () + 3); >> warning: squelched 1 whitespace error >> warning: 6 lines add whitespace errors. I'll fix those. Thank you for giving this a whirl (again)! Keith