From: scstech@solomon.technet.sg (wl)
Subject: Problem with HP C++, Intercepting cfront
Organization: Singapore Computer Systems Ltd
Date: Tue, 14 Apr 1992 08:59:05 GMT

Hi,

  A big hello to everyone on the net !

  At the moment, we have a HP 9000/400 system (HP-UX 8.0) that we are doing
some porting work on.  We've been facing a problem while trying to intercept
the cfront during the CC process.  Perhaps there is someone out there who has
had similar experience with this and I would greatly appreciate your insight.
Here's a short run-up to the problem:

  When we compile a class using HP's CC, we intercept the cfront using the -tC
option.  We invoke our own cfront to generate some code and then follow that
by calling the native cfront.  Everything seems to go smoothly and I've been
able to build the libraries needed.  However, when we make the test programs, 
if we use the -g option in CC to compile, we get the following warning 
messages:

  ld: error in debug tables in test.o
  ld: error in debug tables in test.o
  ld: error in debug tables in test.o
  ld: error in debug tables in test.o
  ld: error in debug tables in mylib.a
  ld: error in debug tables in mylib.a
  ld: error in debug tables in mylib.a
  ld: error in debug tables in mylib.a

  The program runs fine and I could run xdb on it.  However from the
looks of things, there could be some debug information missing.  I think
perhaps there could be something wrong with the way we intercept the
cfront.

  What I would like to know is

  1.  Are there any special considerations when intercepting cfront and using
  the -g option ?  The reason I ask is because when I use the -v option to
  see the steps taken during CC, I noticed there's an additional temporary
  file being used and passed to the native cfront.  That's not seen during
  optimized mode.

  2.  Other options are also seen being used on the native cfront like +f, +g
  and +XC.  Where can we get the documentation on these options.  There isn't
  any available on man and the manuals that comes with the system we purchase.

  I've attached the verbose output of a normal CC and the intercepted run.
  Hope its helpful.

  Normal CC run:
  CC -g -c test.cxx
 /usr/lib/Cpp.ansi -$ -Dc_plusplus -D__cplusplus -D__hp9000s300 -D__hpux -D__uni
x -Dhp9000s300 -Dhpux -Dunix -I/usr/include/CC -I/usr/include test.cxx /usr/tmp/
AAAa01617.i
 /usr/lib/cfront +ftest.cxx -g/usr/tmp/BAAa01617.x +XC/usr/tmp/CAAa01617 </usr/t
mp/AAAa01617.i >/usr/tmp/CAAa01617
 /usr/CC/bin/as.cxx -otest.o /usr/tmp/CAAa01617
 removing /usr/tmp/AAAa01617.i
 removing /usr/tmp/BAAa01617.x
 removing /usr/tmp/CAAa01617

  Intercepted CC run:
  cxxhp -g -c test.cxx
+ /usr/bin/CC +T -Wp,-DVPP_CXXHP,-DVPP_OM_VERS=9010701 -tC,/usr/local/osc/bin/cx
x2sch -WC,+T/usr/lib/cfront -v -g -c test.cxx
 /usr/lib/Cpp.ansi -DVPP_CXXHP -DVPP_OM_VERS=9010701 -$ -Dc_plusplus -D__cpluspl
us -D__hp9000s300 -D__hpux -D__unix -Dhp9000s300 -Dhpux -Dunix -I/usr/include/CC
 -I/usr/include test.cxx /usr/tmp/AAAa01629.i
 /usr/local/osc/bin/cxx2sch +T/usr/lib/cfront +ftest.cxx -g/usr/tmp/BAAa01629.x</usr/tmp/AAAa01629.i >/usr/tmp/CAAa01629.i
 /bin/cc -g -c /usr/tmp/CAAa01629.i
CCOPTS is : -v
/usr/tmp/CAAa01629.i:
  /lib/ccom:  ccom -Yg -YS /usr/tmp/CAAa01629.i |
  /bin/as:  as -o CAAa01629.o
 /usr/lib/c++merge CAAa01629.o /usr/tmp/BAAa01629.x test.o
 removing /usr/tmp/AAAa01629.i
 removing /usr/tmp/BAAa01629.x
 removing /usr/tmp/CAAa01629.i
 removing CAAa01629.o

  NB: cxxhp - script
      cxx2sch - our own cfront

  Thank you for your kind attention.  Any help is greatly appreciated !

Best regards,

Wilson Lau
scstech@solomon.technet.sg