www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/12/19:17:01

From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Message-Id: <199608122312.JAA05520@gbrmpa.gov.au>
Subject: Debugging woes...
To: djgpp AT delorie DOT com
Date: Tue, 13 Aug 1996 09:12:46 +1000 (EST)

Ok, I am STILL writing this window stuff, and using a lot of doubly linked
lists...

The problem: When I run the program normally, it dies with a seg fault...I
have found the problem line using the traceback eip, and its:
	x = temp->next->x;
in the subroutine which looks something like:
	while (temp->next != NULL)
	{
		...
		x = temp->next->x;
		...
	}
I KNOW that the original structures pointer to next is originally assigned
to NULL when it is added onto the end of a list (this is the only time
it crashes), but upon execution of the program from the command line (win.exe)
it crashes. Using printf of the temp->next value, I get some weird negative
number like -24.

Anyway, I can't seem to debug it, because when I run the program under
fsdb and single step, run etc the program, it runs fine!!! 

WHY?

Leathal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019