unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Simultaneous gdb session badness
@ 2005-08-16 20:53 Michael Welsh Duggan
  2005-08-16 21:20 ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Welsh Duggan @ 2005-08-16 20:53 UTC (permalink / raw)


I wish I could say just when this problem cropped up, but...

In the current CVS, I cannot run gdb though the gud on two seperate
programs simultanously.  For example, if I start a gud session for
program A, then one for program B, if I then type "b main" in program
A's gud buffer, the breakpoint gets set in program B.

This definitely worked in 21.3, and I can remember doing it in earlier
versions of 22.0.  It is a frequent occurence for me to want to run
seperate gdb session in the same emacs, especially when they are
intercommunicating processes.

I will take a look to see if I can figure out what is happening, but I
want to get this bug report out soonest.

-- 
Michael Welsh Duggan
(md5i@cs.cmu.edu)

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

* Simultaneous gdb session badness
  2005-08-16 20:53 Simultaneous gdb session badness Michael Welsh Duggan
@ 2005-08-16 21:20 ` Nick Roberts
  2005-08-18  5:36   ` Michael Welsh Duggan
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 2005-08-16 21:20 UTC (permalink / raw)
  Cc: emacs-devel

Michael Welsh Duggan writes:
 > I wish I could say just when this problem cropped up, but...
 > 
 > In the current CVS, I cannot run gdb though the gud on two seperate
 > programs simultanously.  For example, if I start a gud session for
 > program A, then one for program B, if I then type "b main" in program
 > A's gud buffer, the breakpoint gets set in program B.
 >
 > This definitely worked in 21.3, and I can remember doing it in earlier
 > versions of 22.0.  It is a frequent occurence for me to want to run
 > seperate gdb session in the same emacs, especially when they are
 > intercommunicating processes.

The default behaviour for gdb in Emacs has changed considerably since 21.3.
You could read the manual to understand these differences.  It says
(GDB Graphical Interface):

Manual>   You can also run GDB in text command mode, which creates a buffer
Manual> for input and output to GDB.  To do this, set `gud-gdb-command-name'
Manual> to `"gdb --fullname"' or edit the startup command in the minibuffer to
Manual> say that.  You need to do use text command mode to run multiple
Manual> debugging sessions within one Emacs session.

Text command mode refers to the mode used in 21.3.  The default mode for
22.1 is referred to as graphical mode and uses "gdb --annotate=3".

When your gdb sessions are independent, you can always uses separate Emacs
sessions, of course.

Nick

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

* Re: Simultaneous gdb session badness
  2005-08-16 21:20 ` Nick Roberts
@ 2005-08-18  5:36   ` Michael Welsh Duggan
  2005-08-18  8:11     ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Welsh Duggan @ 2005-08-18  5:36 UTC (permalink / raw)
  Cc: emacs-devel

Nick Roberts <nickrob@snap.net.nz> writes:

> Michael Welsh Duggan writes:
>  > I wish I could say just when this problem cropped up, but...
>  > 
>  > In the current CVS, I cannot run gdb though the gud on two seperate
>  > programs simultanously.  For example, if I start a gud session for
>  > program A, then one for program B, if I then type "b main" in program
>  > A's gud buffer, the breakpoint gets set in program B.
>  >
>  > This definitely worked in 21.3, and I can remember doing it in earlier
>  > versions of 22.0.  It is a frequent occurence for me to want to run
>  > seperate gdb session in the same emacs, especially when they are
>  > intercommunicating processes.
>
> The default behaviour for gdb in Emacs has changed considerably since 21.3.
> You could read the manual to understand these differences.  It says
> (GDB Graphical Interface):
>
> Manual>   You can also run GDB in text command mode, which creates a buffer
> Manual> for input and output to GDB.  To do this, set `gud-gdb-command-name'
> Manual> to `"gdb --fullname"' or edit the startup command in the minibuffer to
> Manual> say that.  You need to do use text command mode to run multiple
> Manual> debugging sessions within one Emacs session.

Yes, I see that now.  It was not obvious from NEWS, so I didn't
realize I needed to reread the gdb manual.  (I remember reading the
messages covering bits of this on emacs-devel now that you brought
this up, but I obviously didn't read them closely enough.)

More importantly though, if one cannot run multiple sessions without
using --fullname, M-x gdb should not allow you to attempt to so.  It
would be much better for it to give an understandable error message
letting the user know what is going on.

> Text command mode refers to the mode used in 21.3.  The default mode for
> 22.1 is referred to as graphical mode and uses "gdb --annotate=3".
>
> When your gdb sessions are independent, you can always uses separate Emacs
> sessions, of course.

Of course, but I have this thing about running more than one emacs on
a machine at a time.  Call it silly, but I prefer not to do it.

-- 
Michael Welsh Duggan
(md5i@cs.cmu.edu)

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

* Re: Simultaneous gdb session badness
  2005-08-18  5:36   ` Michael Welsh Duggan
@ 2005-08-18  8:11     ` Nick Roberts
  2005-08-19  4:59       ` Michael Welsh Duggan
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 2005-08-18  8:11 UTC (permalink / raw)
  Cc: emacs-devel

Michael Welsh Duggan writes:
 > Yes, I see that now.  It was not obvious from NEWS, so I didn't
 > realize I needed to reread the gdb manual.  (I remember reading the
 > messages covering bits of this on emacs-devel now that you brought
 > this up, but I obviously didn't read them closely enough.)

The old behaviour has not changed.  Perhaps NEWS should say that the new
behaviour is the default now.  (The extract that I posted earlier was from
the Emacs manual and *not* the gdb manual.  Which NEWS did you read?)

 > More importantly though, if one cannot run multiple sessions without
 > using --fullname, M-x gdb should not allow you to attempt to so.  It
 > would be much better for it to give an understandable error message
 > letting the user know what is going on.

Sure.  The problem is that Emacs has to start running gdb and receive some
output before it knows whether its working in text mode or graphical mode.
Currently the GUD buffer is created before gdb is run.

 > > Text command mode refers to the mode used in 21.3.  The default mode for
 > > 22.1 is referred to as graphical mode and uses "gdb --annotate=3".
 > >
 > > When your gdb sessions are independent, you can always uses separate Emacs
 > > sessions, of course.
 > 
 > Of course, but I have this thing about running more than one emacs on
 > a machine at a time.  Call it silly, but I prefer not to do it.

Well with one Emacs and the old behavior you still only have one overlay arrow
which must be shared, and the program names must be different.

Nick

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

* Re: Simultaneous gdb session badness
  2005-08-18  8:11     ` Nick Roberts
@ 2005-08-19  4:59       ` Michael Welsh Duggan
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Welsh Duggan @ 2005-08-19  4:59 UTC (permalink / raw)
  Cc: emacs-devel

Nick Roberts <nickrob@snap.net.nz> writes:

> Michael Welsh Duggan writes:
>  > Yes, I see that now.  It was not obvious from NEWS, so I didn't
>  > realize I needed to reread the gdb manual.  (I remember reading the
>  > messages covering bits of this on emacs-devel now that you brought
>  > this up, but I obviously didn't read them closely enough.)
>
> The old behaviour has not changed.  Perhaps NEWS should say that the new
> behaviour is the default now.  (The extract that I posted earlier was from
> the Emacs manual and *not* the gdb manual.  Which NEWS did you read?)

I should have said the gdb section of the Emacs manual.

>  > More importantly though, if one cannot run multiple sessions without
>  > using --fullname, M-x gdb should not allow you to attempt to so.  It
>  > would be much better for it to give an understandable error message
>  > letting the user know what is going on.
>
> Sure.  The problem is that Emacs has to start running gdb and receive some
> output before it knows whether its working in text mode or graphical mode.
> Currently the GUD buffer is created before gdb is run.

I would take that.  It would catch the majority of cases, I think.
You'd have to start two sessions at very nearly exactly the same time
for the second to start before the first produced any output, I would
think.

-- 
Michael Welsh Duggan
(md5i@cs.cmu.edu)

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

end of thread, other threads:[~2005-08-19  4:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 20:53 Simultaneous gdb session badness Michael Welsh Duggan
2005-08-16 21:20 ` Nick Roberts
2005-08-18  5:36   ` Michael Welsh Duggan
2005-08-18  8:11     ` Nick Roberts
2005-08-19  4:59       ` Michael Welsh Duggan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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