The usual way of instrumenting C++ code is to capture the output from
cfront, instrument that, then compile it.  The following may be of
use:

==============
Well, if I instrument C++ source, I first translate it to C source, instrument it
and compiles it, but the linking can best be done with the C++ compiler.
(Otherwise I have to look how it call the loader, with a whole bunch of
 extra libraries)
Gct in the link phase will first compile the gct- c files, then calls the c compiler
whith only the o files, this will cause the loader to fail, while it can not 
find the c++ specific functions.
If I do the link phase with gct -test-cc <C++compiler>, then it stops in compiling
the gct c files.
So I made a script to do the switching myself,
but I rather avoid an extra shell+loop :->.
my_cc:
----------------------------------------------------------------------
:
CC=CC					# default is the C++ compiler
for	i
do	case $i in
		*.c)	CC=cc;;		# C compiler
		*.C)	CC=CC;;		# C++ compiler
	esac
done
set -x
$CC "$@"
----------------------------------------------------------------------
And use in the Makefile:
gct:
	gct-init
	-rm -f $(CS)		# removes all intermediate C source
	$(MAKE) $(MFLAGS) all "CC=gct -test-cc ./my_cc"

BTW. The $(MFLAGS) will cause 'make -n gct' to show its work all the way down.
	Maybe a good idea to insert in all the gct makefiles & examples.

