Mail Archives: djgpp/1994/11/01/02:50:13
Date: Mon, 31 Oct 94 16:36:43 -0500
From: dj AT stealth DOT ctron DOT com (DJ Delorie)
> It might be nice to have a _debugging_ library which checked for
> things like null pointers passed to strxxx() routines. A related
> item: Borland compilers tend to print "(null)" when you pass null
> to printf rather than crashing or printing garbage.
I think a stack trace (or gdb exception) is the best kind of debugging
- "It broke - HERE"
Well, yes, except that early releases of v 1.10 didn't always point to
the rigth place; symify would often give a line too late or early, I
forget which, and I had a devil of a time figuring it out. Nowadays I
awk out the 5 lines surrounding the place pointed to by symify, and if
I see a strxxx() I look for a NULL pointer. :-) But I didn't know
that *then*, and other newbies don't know that *now*. If this
(admittedly teensy weensy) bug has been fixed, then I don't see a lot
of need for a debugging library.
Oh, yeah, didn't you say that under DPMI you don't get a GPF and
stack dump in this situation? (I have no idea what I'm talking about,
I don't use DPMI, I just recall a bunch of words that were sort of in
that order---a reply to Tony Helm's original question about
"strcat()?") If this is so, then there is a need for a debugging
library.
--Steve
- Raw text -