From: Mark Hull-Richter Subject: Odd behavior - summary To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing List) Date: Thu, 2 Mar 1995 14:33:45 -0800 (PST) FYI, as promised, here is a summary of the advice I received. The most prominent suggestion was to compile with both -g and -O. I did that. Now a seed which bombed the -O (only) version right away takes as many as five rounds before it blows up. The most recent error that occurs shows up in edebug32 as an exception 12 (0xc), error code 0x20000. I don't know what that means, but the register dump shows a destroyed %ebp. This seems to happen when a particular selection is set up that loops twice and bombs after the second iteration. This is interesting, as the function in question is executed dozens of times before the error occurs, but I'm still on it. Another suggestion, re the program sizes, was to use strip - I will if this continues too long.... There was at least one suggestion to use -S and look at the assembly language of the offending module. I may do that if I have to, but a) the module is a bit large for that and, more importantly, b) I'm no expert at assembler (yet :-). One person suggested I use the errors in BCC to track down incompatibilities and fix the program. I sent that person a response, but on re-reading would like to add that I did try that. The problem is that the program dies under BCC during primary initialization, where it is trying to allocate some data structures. This happens every time, from the command line or under the IDE, and it blows the machine away every time. I tried to sneak up on it in the debugger, but I could never get it to stop in the right place, and as soon as it went that one or two lines too far, blam. Also, I kept seeing anomalies in the generated code that led me to believe that the problem (there) was with BCC, not my program. TCC had the same type of difficulty, except that it couldn't seem to accumulate into a variable and would always wind up attempting to allocate a 0 byte datum, and that killed the machine as well. I have little enough time to work on this as it is, so I decided to follow the path of least disruption, which is so far DJ's gcc. It works most of the time, and I should be able to isolate the bad case where it keeps failing. New question: what are the exception codes / unsupported INTs and where can I look up them and their associated errors codes? I tried using info, but I guess the interface either doesn't have the answer, is missing a needed file (which one?) or is too different for me to follow (yet). I haven't given up. Thanks for all the input. I'm still on it. -- ++== AT&T Mark A. Hull-Richter, Consulting Engineer (310)524-5782 voice +GIS== Global Teradata Decision Enabling Systems Center 427-5782 VoicePlus =++=== Information 100 North Sepulveda Boulevard, #17-259 (310)524-5517 FAX ==== Solutions El Segundo, CA 90245 mhr AT sparc DOT SanDiegoCA DOT ATTGIS DOT com