This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stop the Insanity! Linespec Rewrite


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]