Name Mangling from Solaris CC

Guenther Grau Guenther.Grau@bk.bosch.de
Fri May 8 04:27:00 GMT 1998


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.



More information about the Gdb mailing list