help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and Gud


From: Nick Roberts
Subject: Re: Emacs and Gud
Date: Mon, 7 Jan 2008 16:41:44 +1300

 > > possible that they have configured Emacs to just use text mode.  However,
 > > even in this case Emacs 22.1 should look like this:
 > > 
 > > Run gdb (like this):
 > > gdb --fullname
 > > /home/chris/mydata/Projects/SimSoup/simsoup-cpp/simsoup/simsoup
 > > 
 > Interesting.  This gets me into a graphical mode where I have a source
 > window with a pointer in the fringe by the execution point. However, I
 > still don't have the other debugger windows (stack etc.), and I don't have
 > the little red dot in the fringe by breakpoints.

This is what we call text command mode in the Emacs manual.  Its "traditional"
GUD that has been part of Emacs 21 and earlier.  Its quite basic: there are
just two buffers, the GUD buffer for typing GDB commands and the source buffer.
I would guess from your surprise and description that you've not used gdb
in an earlier version of Emacs.

 > > or this:
 > > 
 > > Run gdb (like this):
 > > gdb --annotate=1
 > > /home/chris/mydata/Projects/SimSoup/simsoup-cpp/simsoup/simsoup
 > > 
 > This gives the same as gdb --fullname

--fullname and --annotate=1 are equivalent options in GDB.

 > 
 > > What value does gud-gdb-command-name have?
 > > 
 > (gud-gdb-command-name "gdb 
 > /home/chris/mydata/Projects/SimSoup/simsoup-cpp/simsoup/simsoup")

OK, now I understand.  The default option "--annotate=3" is necessary for the
operation of the GDB Graphical Interface ("--annotate=2" also works but there
are differences).  I'll will add a note in the doc string to that effect -
thanks.

It looks like you only ever debug one program. If that's the
case customise gud-gdb-command-name to:

"gdb --annotate=3 
/home/chris/mydata/Projects/SimSoup/simsoup-cpp/simsoup/simsoup"

 > If I try --annotate=2 I get all the debug windows, but now the gdb command
 > line usually won't do anything (eg if I type "list" nothing happens)! I did
 > however get a working system the first time I tried --annotate=2, with the
 > little red dot etc., but no joy since then

Emacs might be confused by the previous value.  What happens if you
customise gud-gdb-command-name to the above value and restart Emacs?

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]