From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Starting multiple GUD session; doc problem
Date: Sun, 26 Nov 2006 17:53:08 +1300 [thread overview]
Message-ID: <17769.7604.137412.491382@kahikatea.snap.net.nz> (raw)
In-Reply-To: <u3b87wtei.fsf@member.fsf.org>
> > > I just tried to start two gdb sessions in one CVS Emacs session for
> > > the first time (I've done this many times in Emacs 21). I got the
> > > error message:
> > >
> > > "gdb: Multiple debugging is only supported with "gdb --fullname"
> > >
> > > So I dutifully added "--fullname" to the gdb command line:
> > >
> > > gdb --annotate=3 --fullname gds-main_models_test.exe
> >
> > Well, I'm not sure that's dutiful, it means start with "gdb --fullname"
> > _instead of_ "gdb --annotate=3" but if other's find it ambiguous too
> > I'll change it.
>
> Since the info manual never mentions "--annotate=3", I thought it was
> always necessary. So yes, I found it ambiguous.
I guess it presupposes a knowledge of "--fullname" and "--annotate=3". Ideally
it would mention neither but give the user the option of switching between
the two in terms of their functionality.
> But I run "gdb" without "--fullname" all the time in Emacs 21. I
> thought that meant gud was searching the directory path in
> compilation-search-path.
It gets added by Emacs, it's just not displayed in the minibuffer. See
gud-gdb-massage-args.
> However, testing on Emacs 22, I see the --fullname is required now.
>
> > The current doc string goes on to explain what how this function
> > lays out the buffers. To the first time user what would GUI mode
> > mean?
>
> Good point. On the other hand, the first sentence in 32.6.5 mentions a
> "graphical interface"; so that would be a good place to define "GUI
> mode".
>
> > The other changes are wrong because "--fullname" is needed. Perhaps
> > some confusion arises over the term "text command mode". It refers
> > to the way that it works in Emacs 21: GUD buffer + source buffer.
>
> Right, I did understand that. "gdb --fullname" works the same in Emacs
> 22 as "gdb" in Emacs 21,
They work the same because they _are_ the same i.e. both use --fullname.
> and that is the behavior I was expecting. In
> particular, I don't have to do anything special to get two debugging
> sessions.
>
> At the same time, if you don't customize 'gdb-many-windows', "gdb
> --annotate=3" in Emacs 22 also works the same as "gdb" in Emacs 21,
> except that it doesn't allow multiple debugging sessions. So that's
> why I was surprised by this.
I've arranged so that it starts up the same way. However it has much more
functionality. If you create a breakpoint a red bullet is placed in the
fringe/margin so you don't have to remember where your breakpoints are. You
can view the stack, examine watch expressions, manipulate breakpoints...
> GUI mode (with 'gdb-many-windows' t) adds a fancy display (which I
> find annoying; I prefer my screen real estate to show actual code :).
Many people like to set gdb-many-windows to t but the default value is nil
If you don't want to use it, don't change it's value.
> It also adds tooltips for viewing variables, which is very nice.
GUD Tooltips are available for Emacs 21 but they are rather awkwad to turn on
and off.
> (aside; I don't understand why the tooltips are not available in "text
> command mode". Is "--annotate" required to get tooltip variable values?)
The section Debugger Operation says
GUD tooltips are disabled when you use GDB in text command mode
(*note GDB Graphical Interface::), because displaying an expression's
value in GDB can sometimes expand a macro and result in a side effect
that interferes with the program's operation. The GDB graphical
interface supports GUD tooltips and assures they will not cause side
effects.
> > Perhaps it would help to refer to "text command mode" in the section
> > "Debugger Operation" (it currently says "using the textual
> > interface").
>
> Yes, that would help.
I think "text command mode" and textual interface (and graphical interface)
are RMS' terms. Let's see what he thinks.
> Hmm. The first paragraph there says the program input and output is
> via the GUD buffer, in text command mode. However, it doesn't say
> where they are in GUI mode;
That's because the graphical interface is described in a later section
> are there separate buffers for that? Hmm.
> I just tried it, and the answer seems to be "no";
The answer is yes. See GDB User Interface Layout
> stdin and stdout are
> still mixed in the GUD buffer in GUI mode. Perhaps there is another
> variable to customize?
gdb-use-separate-io-buffer. See Other GDB-UI Buffers. I think it's only fair
that you read what is in the manual first.
> I'm running GNU gdb 5.3 for GNAT Pro 5.04a
> (20060125), compiling Ada code.
5.3 sounds old to me. Even if you use FSF GDB (6.6 shortly) you should be
able to debug Ada code. I've even tested expanding/contracting arrays
as watch expressions in the speedbar.
>...
> If it was totally up to me, I'd make "M-x gdb" in Emacs 22 do "gdb
> --fullname" by default, since that is closest to the Emacs 21 behavior
> (it allows multiple debugging sessions).
Fortunately it's not up to you. The aim of Emacs 22 is to improve upon
Emacs 21 not emulate it. Could you please experiment with the new
features and report your findings so that we can improve it further.
> To get the GUI mode, you
> would do "M-x gdba". (And that's how I've customized things in my
> .emacs).
>
> That means people would have to read the manual to know about the GUI
> mode.
The default behaviour is generally the one which is most useful.
> But that is the case now anyway; you have to set
> 'gdb-many-windows' to get the GUI mode multiple windows display when
> starting with "M-x gdb",
Other buffers can be displayed manually from the menu bar without setting it.
> and you have to read the manual to know that.
> You also have to read the manual to know about the additional mouse
> bindings.
It is true that you need to read the manual to understand the new features,
and that's not a bad thing, but I think many are fairly intuitive if you
have experience of graphical debuggers.
> I've attached an updated patch.
Please don't. There's currently no consensus that your changes are the
right ones.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2006-11-26 4:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 17:03 Starting multiple GUD session; doc problem Stephen Leake
2006-11-25 0:48 ` Nick Roberts
2006-11-25 13:24 ` Stephen Leake
2006-11-25 14:43 ` Andreas Schwab
2006-11-26 4:53 ` Nick Roberts [this message]
2006-11-26 10:08 ` Stephen Leake
2006-11-26 2:01 ` Richard Stallman
2006-11-26 8:39 ` Nick Roberts
2006-11-26 9:38 ` Stephen Leake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17769.7604.137412.491382@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.