From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Elizabeth Chastain To: dan@cgsoftware.com Cc: gdb@sources.redhat.com Subject: Re: So what is wrong with v3 C++ Date: Fri, 29 Jun 2001 10:28:00 -0000 Message-id: <200106291629.JAA01818@bosch.cygnus.com> X-SW-Source: 2001-06/msg00239.html Daniel Berlin writes: > The thing is, it shouldn't match against demangled forms, it should > match against *fully qualified* forms. Ah, I feel some illumination coming on. > Aclass a; > int c; > c = int a::george(int, int)(5, 6); > > That's what we've got now. gdb's goal is to have an expression evaluator that is some reasonable subset of the language under test. In K & R C, the translation from "demangled" -> "fully qualified" is trivial. In ANSI C, the translation from "demangled" -> "fully qualified" takes work. You have to convert "foo(int, int)" -> "foo". This conversion is actually built into a string matcher! In C++, the translation from "demangled" -> "fully qualified" is hairy. There are a lot of cases and changing the string matchers is hopeless. It sounds like we need a much more detailed demangler interface, where the demangler gives us the demangled name, the fully qualified name, plus any other forms of the name we care about. Michael