From: Kubicek AT sh DOT cvut DOT cz ("Jiri Kubicek") Subject: RE: running GDB under Emacs on NT 21 Mar 1997 12:38:24 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <100DD83E82.cygnus.gnu-win32@server-y.sh.cvut.cz> Original-To: "Steven J. Zeil" , gnu-win32 AT cygnus DOT com X-mailer: Pegasus Mail v3.1 (R1) Original-Sender: owner-gnu-win32 AT cygnus DOT com Hi, > > > Chris Firth wrote: > > > > ... > > > > line is displayed that indicates the breakpoint is reached at main but > > > > the Emacs hangs. The gdb prompt never appears and the source code does > > > > I have *EXACTLY* the same problem as Chris with the same software > > (under Win95). I tried Win Emacs (Pearl Software) too; I tried even > > I had observed this problem as well. It appeared to go away when I > upgraded from 16Meg to 40. > > Could this be a non-graceful response to a lack of enough memory to run > emacs, gdb, and a non-trivial target executable at the same time? I mean no. The gdb-emacs protocol is based on '\032' char, which is END-OF-TEXT-STREAM character under MSDOS (see http://www.cs.washington.edu/homes/voelker/ntemacs/mail/10.26.96- 1.29.97/0236.html). In my opinion, when gdb sends to Emacs info about current line, something (system?, Emacs?(uses Microtoft Visual C++ runtime library)) closes the pipe. I tried this ugly thing: I found the line in EmacsNT's file GUD.EL, which catches the line info and I changed the \032 to \031 : --- file GUD.EL (defvar gud-gdb-marker-regexp (concat "\031\031\\([^" ":" "\n]*\\)" ":" "\\([0-9]*\\)" ":" ".*\n")) and I changed the GDB executable. The gdb source file ANNOTATE.C contains if (annotation_level > 1) printf_filtered ("\n\032\032source "); else printf_filtered ("\032\032"); /* for Emacs */ so GDB executable contains 0A 1A 1A 73 6F 75 72 63 65 20 00 1A 1A 00 | .source .. ^^ ^^... change to 19 19 ....and the GDB-EmacsNT connection works! Summary: The GDB-Emacs protocol is MSDOS and Win95 incompatible or EmacsNT errorneously closes text stream when sees '\032'. Jirka K. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".