Message-ID: <3659EC37.8543935C@gmx.net> Date: Mon, 23 Nov 1998 22:13:59 -0100 From: Robert Hoehne Organization: none provided X-Mailer: Mozilla 4.07 [de] (Win95; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Help with GDB ... gdb always exits and stdout goes missing References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote : > > On Sun, 22 Nov 1998, Ron Miller wrote: > > > I am running Windows NT 4.0 (I would assume the latest and greates rev as I > > have a new system from Dell that is only a month old). > > Sigh. Another chapter from the NT never-ending bug book... > I would have an idea. The current gdb sources (4.16) contain some bugs which might be the reason for this under NT, since NT is probably more strictly when someone accesses memory which he isn't allowed. When gdb continues and comes the program end, it tries to remove the breakpoints from the loaded image but at this point the program is already unloaded. To check this first, you can try to use the temp breakpoint feature instead of the break command. So use instead of b main now tb main and see, if the problem still exists. If not, you might try (if you have access to a NT machine and are able to recompile gdb) the following patch: --- gnu/gdb-4.16/go32targ.c~ Sun Sep 8 19:46:46 1996 +++ gnu/gdb-4.16/go32targ.c Mon Nov 23 22:01:30 1998 @@ -271,8 +271,25 @@ #endif if (write) - write_child(memaddr, myaddr, len); + { + if(write_child(memaddr, myaddr, len)) + { + return(0); + } + else + { + return(len); + } + } else - read_child(memaddr, myaddr, len); - return len; + { + if(read_child(memaddr, myaddr, len)) + { + return(0); + } + else + { + return(len); + } + } } This patch is only guessed to fix the problem, since I don't have access to NT and so I can't check it by sure. BTW: The above patch is from my current state for porting gdb 4.17 to DJGPP. So, if you see any problems with it, please inform me. But please, for all others, don't ask me, when I finished the gdb 4.17 port, I will not answer such questions. Robert -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************