This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


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

Re: Name Mangling from Solaris CC


Jake Colman wrote:
> 
> >>>>> "Guenther" == Guenther Grau <uunet!bk.bosch.de!Guenther.Grau> writes:
> 
>     Guenther> Well, I did an uname -a to show that I am running Solaris 2.5.1
>     Guenther> :-) Looks like this function didn't exist in Solaris 2.4 then :-)
>     Guenther> The we need to add a compile time flag to enable this feature
>     Guenther> only on Solaris 2.5.1 and higher.
> 
> I found it after some digging.  Our SA did not install things in the typical
> location so none of this is on my path.  Our makefiles explicitly point to what
> we need.
> 
> In any event, in SUNWspro/SC4.2/include/CC I found demangle.h.  The man page is

I've got one in /usr/include and in /opt/SUNWspro/SC4.2/include/CC.

> elsewhere in the same tree.  And I agree, this should be simple to implement.
> The problem is that gdb uses cplus_demangle as the top-level function name for
> all of its supported forms of demangling.  The interface to this function is,
> of course, not the same as the one provided by Sun.  Since gdb is compiled as a
> c program (not c++) you cannot overload the function.  This will require some
> fancy footwork to workaround, no?

Well, depends on how you define fancy footwork. I guess an sed script
and couple
of lines of code should do the trick. Maybe I'll have a look at it next
week.
I will download the latest gdb-4.17 right now to have a look.

  Guenther

P.S.: Jason trimmed from the reply as he is on the list, I guess.