Date: Thu, 8 Aug 1996 11:08:51 +0200 (IST) From: Eli Zaretskii To: Travis Brown-John Cc: djgpp AT delorie DOT com Subject: Re: Hello World = Crash In-Reply-To: <4u9cvg$ogv@felix.junction.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 7 Aug 1996, Travis Brown-John wrote: > That's what I am running. The demo code gives a GPF: > > General Protection Fault at eip=0000356a > eax=0000003f ebx=00001708 ecx=00003e80 edx=0000003f esi=00057000 > edi=d0000000 > ebp=0004f76c esp=0004f764 cs=00a7 ds=00af es=00af fs=0087 gs=00bf > ss=00af > Call frame traceback EIPs: > 0x0000356a > 0x0000187c > 0x000035b8 > 0x0000194a > 0x00004347 Compile and link the problem with -g switch. When it segfaults, run symify on it, and it will print the source filenames and source line numbers right next to these addresses. This will tell you where in the program did the segfault happen. Either this will give you enough info on what's the bug, or you will be able to hunt it down with a debugger. More info about symify can be found in section 9.2 of the DJGPP FAQ list (available as v2/faq201b.zip from the same place you get DJGPP). It is not efficient to post tracebacks here, because people usually cannot tell you what's wrong with your program given the traceback alone. If the above procedure won't help, at least post the traceback with the info that symify adds to it, and tell everything else you saw while trying to debug this; code fragments that cause the crash will also help. If you wonder why a demo crashes, you should know that some bugs might go unnoticed on other platforms; or, if the program is ported from Unix, it might be some DOS-related issue that needs to be taken care of.