From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17270 invoked by alias); 2 Mar 2012 22:41:43 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 17244 invoked by uid 22791); 2 Mar 2012 22:41:41 -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 Message-ID: <4F514C89.3000406@redhat.com> Date: Fri, 02 Mar 2012 22:41:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Tom Tromey CC: archer@sourceware.org Subject: Re: Stop the Insanity! Linespec Rewrite References: <4F501EC1.3050104@redhat.com> <874nu7c51b.fsf@fleche.redhat.com> In-Reply-To: <874nu7c51b.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2012-q1/txt/msg00014.txt.bz2 On 03/02/2012 08:59 AM, Tom Tromey wrote: > Keith> o We now have a (trivial) parser and a lexer. The lexer "word" breaks > Keith> the input on ':', but it does know about "::" as a scope operator for > Keith> C++ (but nothing on ObjC). > > From reading the code I had a feeling that a leading ":" wasn't handled > properly. So I tried it, and `b ::foo' causes an internal error. Doh! I can't believe there is no existing test for that! In any case, I've got a patch for that. > A couple other notes - > > linespec_parse_line_offset only allows decimal but the lexer allows hex. > But why bother with hex? That's a cleanup. I implemented that a loooong time ago, well, just because I could. I'll remove that during the cleanup phase (along with several other unnecessary things). > I noticed the code is missing 'const' in a number of places. I'll fix those. > Keith> For example, you cannot do: "break > Keith> klass::'operator +'" anymore. > > What is the issue with this one? Not much, really. I could probably implement something to do it, but I really view this whole quoting issue as a workaround for bugs in the old linespec.c We don't/shouldn't really need that from here on out. Let me know if you want me to add that back in. > I saw the WHATS_THIS_FOR. I'm not sure what it is for, but on some > platforms a symbol can start with "$", so maybe it is handling that > case. You can maybe construct one with gcc -fdollars-in-identifiers. I'll play with that and see if I can trigger this. Thank you for taking a look! Keith