Date: Sun, 15 Feb 1998 13:30:56 +0200 (IST) From: Eli Zaretskii To: Martin Stromberg cc: djgpp AT delorie DOT com Subject: Re: gdb crash while debugging df In-Reply-To: <6c1jqi$4di$1@antares.lu.erisoft.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 13 Feb 1998, Martin Stromberg wrote: > gdb crashed while I debugged df. When I ran it again I looked first at the > variable before dereferencing it, and it being 0xffffffff I'm not too > surprised that it crashed, but should gdb really _crash_? Is it a bug > in gdb or am I myself to blame? No, it's GDB alright. I doubt that this could be fixed in general, since the exception handling in DJGPP debuggers is extremely tricky. The problem is that the debugger and the debuggee is actually running as a single program, as far as the OS is concerned, and it is very hard to distinguish between exceptions generated by these two. Ideally, exceptions generated by the debugged code should not crash the debugger. One great thing about GDB is that it will allow you to write a user-defined command called e.g. `safeprint' which will look at the pointer before dereferencing it (FFFFFFFFh will almost always trigger a Page Fault).