Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 1995 10:56:01 -0700
From:      Dan Yergeau <yergeau@gloworm.Stanford.EDU>
To:        asami@CS.Berkeley.EDU
Cc:        FreeBSD-Ports@FreeBSD.org
Subject:   c++filt 
Message-ID:  <199505301756.KAA11918@gloworm.Stanford.EDU>
In-Reply-To: Your message of "Tue, 30 May 1995 03:48:06 PDT." <199505301048.DAA10608@silvia.HIP.Berkeley.EDU> 

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Satoshi,

>Sure, why not?  We can make the port fetch binutils-*.tar.gz and
>extract only c++filt, this kind of thing is easy now with the variable
>EXTRACT_AFTER_ARGS.

Most of guts for c++filt is in cplus-dem.c, which is included with
GNU liberty.  If you look at the Makefiles and the source...

cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
	$(CC) -c -DMAIN $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c

$(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o version.o
	$(CC) $(CFLAGS) $(LDFLAGS)  -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o version.o

The "-DMAIN" turns on the compilation of main() in cplus-dem.c.
underscore.o adds "int prepends_underscore = <whatever is
appropriate>", and version.o is self-explanatory.

Instead of dragging in the large binutils package and throwing 99.9%
away, it may be better to rewrite the liberty Makefile to generate
c++filt, or write an equivalent main() driver and link with with -liberty.

>"_RasterRect__9ivPainterP8ivCanvasiiP8ivRaster"

>P.S. BTW, my guess for the one above is: "Painter::RasterRect(Canvas,
>     int, int, Raster)".... :)

Actually, it is

  ivPainter::RasterRect(ivCanvas *, int, int, ivRaster *)

And, yes, the "iv" prefixes are very important, at least for picky
utilities like ld. :^)


Dan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505301756.KAA11918>