cp-name-parser.y

Aleksandar Ristovski aristovski@qnx.com
Fri Feb 29 19:32:00 GMT 2008


Daniel Jacobowitz wrote:
> On Fri, Feb 29, 2008 at 01:22:00PM -0500, Aleksandar Ristovski wrote:
>> Hello,
>>
>> If you could, let me know how mature is that code there and can it be used.
> 
> What would you like to use it for?
> 

I am looking at that since right now something like this:

-var-create - * "(anonymous namespace)::foobar"

will not work since c_parse doesn't know anything about '(anonymous namespace)'. 
I guess it wouldn't be too hard to hack around this particular case, but a 
proper solution would be preferable.

I see that language_defn for c++ uses c_preprocess_and_parse but there should 
probably be something like cp_preprocess_and_parse, sharing the macro handling 
part but calling cpname_parse instead of c_parse. Or maybe calling cpname_parse 
if c_parse fails.

The issue is evident when using IDE (CDT). IDE will call
ptype foobar
which prints type (correctly) something like this: '(anonymous 
namespace)::FooBar' and then IDE uses this string as argument to -var-create, 
but unfortunately, this doesn't work.



More information about the Gdb mailing list