Nick Roberts writes: > Stephen Leake writes: > > 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. > > It seems the real issue is the presence or absence of "--annotate=3", > > not the presence of "--fullname". In fact, "--fullname" is not > > necessary if compilation-search-path is set to include the source > > directories. > > That's not true. If "--annotate=3" is not used the option "--fullname" is > necessary for the Emacs to display the current line in the source > buffer. "--fullname" provides path information for source files. Apparently "--annotate=3" also provides that, but in a different way. 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. 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, 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. 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 :). It also adds tooltips for viewing variables, which is very nice. (aside; I don't understand why the tooltips are not available in "text command mode". Is "--annotate" required to get tooltip variable values?) > 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. 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; are there separate buffers for that? Hmm. I just tried it, and the answer seems to be "no"; stdin and stdout are still mixed in the GUD buffer in GUI mode. Perhaps there is another variable to customize? I'm running GNU gdb 5.3 for GNAT Pro 5.04a (20060125), compiling Ada code. So the discussion of debugger input/output and program input/output is correct whether in GUI mode or text command mode. 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). 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. 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", and you have to read the manual to know that. You also have to read the manual to know about the additional mouse bindings. I've attached an updated patch.