Index: [thread] [date] [subject] [author]
  From: mongoose@ms241739.users.mindspring.com
  To  : GGI-Mailing-Liste <ggi-develop@eskimo.com>
  Date: Sun, 11 Jul 1999 16:20:56 -0400 (EDT)

Re: hacking methods to find out bugs

On Sun, 11 Jul 1999, Christoph Egger wrote:

>I'm the author of the 3DtoolKit-Library. About two weeks ago, I
>restructured the headers. Since this, the screen is always blank, and the
>programs using my libs crashs on sig 11 after exiting.

You changed the headers?  Remember you can only use prototypes in headers,
you can't allocate memory or define functions there.  Also make sure
you're not including a header more than once using #ifdefs.  Also make
sure you've rm'ed all the old object files and aren't linking old objects
that may have linked with the old headers...  rememer changing a header
will not cause a standard Makefile to recompile ( unless you wrote a make
dep script ).  I know this is common sesne stuff, but basics are
overlooked sometimes.

>Which hacking methods are known to find the bugs?

You can try using printfs and adding extra checking... for example always
check if your buffers are allocated memory before using them.  ( This
should alway be done, but it's a good example. )

The command gdb is the GNU debugger, it has "online" help as they say.  =)

I'm assuming you're new to linux not coding...  It helps to always keep
backups so you can diff the last working version to find mistakes quickly!

As the English transvestite comic says "ciao".


cheers,
Terry


 ---------------------------------------------------
| BotShop     http://www.planetquake.com/botshop    |
| Personal    http://www.westga.edu.com/~stu7440    |
|                                                   |
|         Alita is running linux 2.2.10             |

Index: [thread] [date] [subject] [author]