running GDB under Emacs on NT

Jiri Kubicek Kubicek@sh.cvut.cz
Fri Mar 21 06:04:00 GMT 1997


    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@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list