From: Lyle Newsgroups: comp.os.msdos.djgpp Subject: Debugging Information && SIGSEGV faults Date: Sun, 10 Aug 1997 17:05:39 +1000 Organization: Monash Uni Lines: 51 Message-ID: <33ED6843.715EA2D8@NO_SPAMccds.cc.monash.edu> NNTP-Posting-Host: ascend-2-24.cc.monash.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, I have recently started using DJGPP. I first wrote the code in TBC++v3.0 and ported it across. After a few function nae changes, the code is now compiling with no errors/warning in DJGPP. However, when i am running it, i am getting a SIGSEGV fault. So i read up in the FAQ and info files on how to recitify this problem. It suggested bugs (or somehting) under windows and different DPMI programs. So i tested it under a few and the same fault. I am using gdb and when the SIGSEGV occurs, the pointer is indeed pointing to a large value. So then the SGISEGV is justified. However, i can;t understand HOW it can be pointing to such a large value? The code works fine when compiled in TBC++? The functiono that it is occuring from is a "pad_string" function, which simply pads it with spaces. The string that it is occuring from is a global variable, i.e config_type config; char num_received_from[MAX_OPTS][MAX_LENGTH]; now i run a initialise function on the config at startup, it works fine, writing to all ements. All i am doing is simply the follwowing; pad_string(config.num_received_from[2],MAX_LEGNTH-1); Yet for some reason, the address being passed is extremly large. all i can imagine is that somethings going wrong somewhere? Now heres, where the debugging info comes in. I can't seem to trace the program in gdb (or RHIDE for that matter, but then RHIDE dpends on gdb so that is to be expected). for some reason, i can only trace the code in the top source for each of my objects, ie I have object sources, and witihin those sources i have #include "sddsd" for some more code relating to that object. GDB doesn;t tract into any of the #include files, only the ones specified in the make file? Am i doing something wrong?? thanks Lyle -- NOTE: Remove The comment "NO_SPAM" To Reply via Email! -------------------------------[ **NEW ADDRESS** lpak1 AT ccds DOT cc DOT monash DOT edu DOT au] " Hello Chevra Kadish, You Kill 'em, We Chill 'em " .----, | oO | HTTP://www-personal.monash.edu.au/~lpak1/ | \/ | `----'