Message-Id: <3.0.16.19980310195306.1baf5e0c@hem1.passagen.se> Date: Tue, 10 Mar 1998 19:53:12 -0500 To: Nate Eldredge From: Peter Palotas Subject: Re: MSS 10B Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 17.41 1998-03-09 -0800, you wrote: >At 09:00 3/8/1998 -0500, Peter Palotas wrote: >>At 19.59 1998-03-08 +0100, you wrote: >> >>Hi Tom, >This is not a *good* solution, but it might help. G++ routes `new' calls to >`malloc'. With a little linker magic, I believe you can get all `malloc' >calls rerouted to your own routine. See the `--wrap' option to `ld'. > >This doesn't allow you to get the line numbers, though. I suppose if you >were *really* masochistic, you could make the user compile with `-g', then >look at the stack for the address of their function and use the debug info >to translate that into file and line number. `libdbg.a' has some routines >that might help with that. There is just one problem with this solution. It is not ANSI compatible, and MSS was designed to be fully(?) ANSI compatible, so that it can be used with most compilers out there. -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ****************************************************** * A brief description of DJGPP: * * NEVER BEFORE HAVE SO FEW DONE SO MUCH FOR SO MANY! * ******************************************************