public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: running GDB under Emacs on NT
@ 1997-03-18  9:38 Sergey Okhapkin
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Okhapkin @ 1997-03-18  9:38 UTC (permalink / raw)
  To: gnu-win32, 'Chris Firth'

Chris Firth wrote:
> 	Emacs		19.34.1
> 
> I have compiled the infamous "hello world" program with the "-g" option.
> In Emacs, I invoke the command "gdb hello.exe".  A "gud-hello.exe"
> window opens.  From there I enter "target exec hello.exe" and then "run"
> on the command like and it runs OK (I do get a bunch of messages
> complaining about not being able to read line numbers in some .dll files
> but I assume that's because I don't have the source for these files).
> If I try to run the same thing with a breakpoint set at "main" then a
> 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
> not show up in another window.  ^X^C does not free things up.  I have to
> kill the gdb.exe task from the NT Task Manager to get Emacs to work
> again.

I just tried the same with the same version of Emacs. No problems at all! Did You read NTemacs FAQ?

-- 
Sergey Okhapkin
Moscow, Russia
Looking for a job.


-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: running GDB under Emacs on NT
  1997-03-21  6:04 Jiri Kubicek
@ 1997-03-21 14:30 ` Fabio Somenzi
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Somenzi @ 1997-03-21 14:30 UTC (permalink / raw)
  To: gnu-win32

>>>>> "JK" == Jiri Kubicek <Kubicek@sh.cvut.cz> writes:

 JK> Summary: The GDB-Emacs protocol is MSDOS and Win95 incompatible
 JK> or EmacsNT errorneously closes text stream when sees '\032'.

According to Andrew Innes this is going to be fixed in 19.35.

Fabio

-- 
Fabio Somenzi          | Phone: 303-492-3466
University of Colorado | Fax:   303-492-2758
ECE Dept.              | Email: Fabio@Colorado.EDU
Boulder CO 80309-0425  | WWW:   http://vlsi.colorado.edu/~fabio
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: running GDB under Emacs on NT
@ 1997-03-21  6:04 Jiri Kubicek
  1997-03-21 14:30 ` Fabio Somenzi
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kubicek @ 1997-03-21  6:04 UTC (permalink / raw)
  To: Steven J. Zeil, gnu-win32

    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".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: running GDB under Emacs on NT
  1997-03-19  5:49 Jiri Kubicek
@ 1997-03-20  5:33 ` Steven J. Zeil
  0 siblings, 0 replies; 7+ messages in thread
From: Steven J. Zeil @ 1997-03-20  5:33 UTC (permalink / raw)
  To: gnu-win32

On Wed, 19 Mar 1997, Jiri Kubicek wrote:

> 
> > 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
> > > not show up in another window. 
> > 
> > I just tried the same with the same version of Emacs. No problems at all! Did
> >  You read NTemacs FAQ?
> 
> I have *EXACTLY* the same problem as Chris with the same software 
> (under Win95). I tried Win Emacs (Pearl Software) too; I tried even 
> debug DOS programs with DJGPP GDB debugger under both Emacss, but the 
> GDB session always hangs. I found nothing useful in FAQs.
> 
>                                            Jirka K.
>                                            

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?

SJZ


-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: running GDB under Emacs on NT
@ 1997-03-19  6:30 Chris Firth
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Firth @ 1997-03-19  6:30 UTC (permalink / raw)
  To: Jiri Kubicek, Sergey Okhapkin, Chris Firth, gnu-win32

	>Jiri Kubicek wrote:
> >> I have *EXACTLY* the same problem as Chris with the same software 
> >> (under Win95). I tried Win Emacs (Pearl Software) too; I tried even
> 
> >> debug DOS programs with DJGPP GDB debugger under both   
> >> Emacss, but the 
> >> GDB session always hangs. I found nothing useful in FAQs.
> 
> I searched through a mail archive on NTemacs and found the following
> message from Fabio Somenzi:
> 
> ...
> >> I found two problems with ntemacs (under Win95, at least) and
> cygnus's
> >> port of gdb.
> >>
> >> 1. (easy, hence solved) The marker produced by gdb uses ":" as
> field
> >> separator. gud-gdb-marker-regexp uses path-separator, which is ";"
> >> by default in ntemacs. In my humble opinion this is a bug in
> >> gud.el. The fact that the field separator used by gdb is also the
> >> path separator in Unix is almost a coincidence. In any case,
> >> explicitly setting path-separator to ":" seems to work as a patch.
> >> 
> >> 2. (unsolved) The marker starts with ^Z^Z (or \032\032 if you
> prefer).
> >> I suspect that those end-of-file characters wreak havoc on the
> >> commumications between ntemacs and gdb. I actually redefined
> >> gud-gdb-massage-args so as to eliminate the -fullname option. This
> >> renders GUD pretty useless, but ntemacs and gdb work fine instead
> >> of freezing at the first breakpoint.
> ...
> 
> I tried these two fixes and the second fix seems to fix the hang
> problem.  However, I cannot get the source code to be displayed in
> another window with an arrow pointing to the current line as gdb/emacs
> normally works.  I can however open the source file myself and set
> breakpoints (^X-space) from the source file.
> I don't know if this has anything to do it but I am running the
> command.com shell rather than the bash shell.
> 
> For the entire text of Fabio's message see:
> http://www.cs.washington.edu/homes/voelker/ntemacs/mail/10.26.96-.29.9
> 7/0236.html
> -- Chris
>  
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: running GDB under Emacs on NT
@ 1997-03-19  5:49 Jiri Kubicek
  1997-03-20  5:33 ` Steven J. Zeil
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kubicek @ 1997-03-19  5:49 UTC (permalink / raw)
  To: Sergey Okhapkin, 'Chris Firth', gnu-win32

    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
> > not show up in another window. 
> 
> I just tried the same with the same version of Emacs. No problems at all! Did
>  You read NTemacs FAQ?

I have *EXACTLY* the same problem as Chris with the same software 
(under Win95). I tried Win Emacs (Pearl Software) too; I tried even 
debug DOS programs with DJGPP GDB debugger under both Emacss, but the 
GDB session always hangs. I found nothing useful in FAQs.

                                           Jirka K.
                                           
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* running GDB under Emacs on NT
@ 1997-03-17 12:14 Chris Firth
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Firth @ 1997-03-17 12:14 UTC (permalink / raw)
  To: gnu-win32

I want to run gdb under Emacs so I can view the source code as I hit
breakpoints, single-step, etc.  Has anyone tried this on NT?  I have the
following versions:

	gnu-win32	17.1 (beta)
		gcc	2.7.2-96-10-23
		gdb	4.16.1
	Emacs		19.34.1

These are binary images loaded from the web, I have not built them
locally.

I have compiled the infamous "hello world" program with the "-g" option.
In Emacs, I invoke the command "gdb hello.exe".  A "gud-hello.exe"
window opens.  From there I enter "target exec hello.exe" and then "run"
on the command like and it runs OK (I do get a bunch of messages
complaining about not being able to read line numbers in some .dll files
but I assume that's because I don't have the source for these files).
If I try to run the same thing with a breakpoint set at "main" then a
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
not show up in another window.  ^X^C does not free things up.  I have to
kill the gdb.exe task from the NT Task Manager to get Emacs to work
again.

Thanks in advance.

-- Chris

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-03-21 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-18  9:38 running GDB under Emacs on NT Sergey Okhapkin
  -- strict thread matches above, loose matches on Subject: below --
1997-03-21  6:04 Jiri Kubicek
1997-03-21 14:30 ` Fabio Somenzi
1997-03-19  6:30 Chris Firth
1997-03-19  5:49 Jiri Kubicek
1997-03-20  5:33 ` Steven J. Zeil
1997-03-17 12:14 Chris Firth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).