This is the mail archive of the
mailing list for the Cygwin project.
RE: running GDB under Emacs on NT
- To: "Steven J. Zeil" <zeil at cs dot odu dot edu>, gnu-win32 at cygnus dot com
- Subject: RE: running GDB under Emacs on NT
- From: "Jiri Kubicek" <Kubicek at sh dot cvut dot cz>
- Date: Fri, 21 Mar 1997 10:00:48 OMT+1
- Organization: Silicon Hill 8
> > > 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
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
(concat "\031\031\\([^" ":" "\n]*\\)" ":"
"\\([0-9]*\\)" ":" ".*\n"))
and I changed the GDB executable. The gdb source file ANNOTATE.C
if (annotation_level > 1)
printf_filtered ("\n\032\032source ");
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'.
For help on using this list, send a message to
"email@example.com" with one line of text: "help".