all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3585: gdb not responding on Emacs from CVS
@ 2009-06-16  2:57 Baoqiu Cui
  2009-06-16 12:58 ` Nick Roberts
       [not found] ` <mailman.714.1245158249.2239.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Baoqiu Cui @ 2009-06-16  2:57 UTC (permalink / raw
  To: gnu-emacs-bug

Hi,

I've had this problem for a while on Emacs built from CVS.  Today I
updated my Emacs directory and rebuilt everything, the problem still
exists (GNU Emacs 23.0.94.1 (x86_64-unknown-linux-gnu, X toolkit)).

Basically, after typing in ``M-x gdb'' to debug a program, say myprog, a
buffer called *gud-myprog* will appear, and it displays some info about
gdb and prints out a prompt:

  (gdb) _

Now, if I type in a command like "pwd" and press Enter, *nothing*
happens.  I have to press C-c C-c to get out:

  (gdb) pwd
    C-c C-cQuit
  (gdb)

This does not happen on Emacs 22.3.

Does anyone know what the problem is?

Thanks,
Baoqiu






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

* bug#3585: gdb not responding on Emacs from CVS
  2009-06-16  2:57 bug#3585: gdb not responding on Emacs from CVS Baoqiu Cui
@ 2009-06-16 12:58 ` Nick Roberts
       [not found] ` <mailman.714.1245158249.2239.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Roberts @ 2009-06-16 12:58 UTC (permalink / raw
  To: Baoqiu Cui, 3585; +Cc: gnu-emacs-bug

Baoqiu Cui writes:
 > Hi,
 > 
 > I've had this problem for a while on Emacs built from CVS.  Today I
 > updated my Emacs directory and rebuilt everything, the problem still
 > exists (GNU Emacs 23.0.94.1 (x86_64-unknown-linux-gnu, X toolkit)).
 > 
 > Basically, after typing in ``M-x gdb'' to debug a program, say myprog, a
 > buffer called *gud-myprog* will appear, and it displays some info about
 > gdb and prints out a prompt:
 > 
 >   (gdb) _
 > 
 > Now, if I type in a command like "pwd" and press Enter, *nothing*
 > happens.  I have to press C-c C-c to get out:
 > 
 >   (gdb) pwd
 >     C-c C-cQuit
 >   (gdb)
 > 
 > This does not happen on Emacs 22.3.
 > 
 > Does anyone know what the problem is?

I don't see this.  What version of GDB do you have?

Can you please do M-x gdb-enable-debug before M-x gdb and post the value of gdb-debug-log
after doing:

(gdb) pwd<RET>

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





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

* bug#3585: gdb not responding on Emacs from CVS
       [not found] ` <mailman.714.1245158249.2239.bug-gnu-emacs@gnu.org>
@ 2009-06-16 17:00   ` Baoqiu Cui
       [not found]   ` <mailman.720.1245172650.2239.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Baoqiu Cui @ 2009-06-16 17:00 UTC (permalink / raw
  To: gnu-emacs-bug

Thanks for looking into this, Nick.  Please the info you need below:

nickrob@snap.net.nz (Nick Roberts) writes:

> Baoqiu Cui writes:
>  > Hi,
>  > 
>  > I've had this problem for a while on Emacs built from CVS.  Today I
>  > updated my Emacs directory and rebuilt everything, the problem still
>  > exists (GNU Emacs 23.0.94.1 (x86_64-unknown-linux-gnu, X toolkit)).
>  > 
>  > Basically, after typing in ``M-x gdb'' to debug a program, say myprog, a
>  > buffer called *gud-myprog* will appear, and it displays some info about
>  > gdb and prints out a prompt:
>  > 
>  >   (gdb) _
>  > 
>  > Now, if I type in a command like "pwd" and press Enter, *nothing*
>  > happens.  I have to press C-c C-c to get out:
>  > 
>  >   (gdb) pwd
>  >     C-c C-cQuit
>  >   (gdb)
>  > 
>  > This does not happen on Emacs 22.3.
>  > 
>  > Does anyone know what the problem is?
>
> I don't see this.  What version of GDB do you have?
>
> Can you please do M-x gdb-enable-debug before M-x gdb and post the value of gdb-debug-log
> after doing:
>
> (gdb) pwd<RET>

After typing in ``pwd<RET>'', gdb-debug-log has the following value
(from which you can see the GDB version that I use):

------------------------------------------------------------------------
gdb-debug-log is a variable defined in `gdb-ui.el'.
Its value is 
((recv . "(gdb) ")
 (recv . "Using host libthread_db library \"/lib64/tls/libthread_db.so.1\".\n")
 (recv . "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-unknown-linux-gnu\"...\n")
 (recv . "GNU gdb 6.7.1\nCopyright (C) 2007 Free Software Foundation, Inc.\n"))
------------------------------------------------------------------------

It seems that the Return key was ignored.  After pressing C-c C-c, the
value of gdb-debug-log becomes:

------------------------------------------------------------------------
gdb-debug-log is a variable defined in `gdb-ui.el'.
Its value is 
((recv . "(gdb) ")
 (recv . "Quit\n")
 (recv . "(gdb) ")
 (recv . "Using host libthread_db library \"/lib64/tls/libthread_db.so.1\".\n")
 (recv . "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-unknown-linux-gnu\"...\n")
 (recv . "GNU gdb 6.7.1\nCopyright (C) 2007 Free Software Foundation, Inc.\n"))
------------------------------------------------------------------------

Thanks,
Baoqiu






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

* bug#3585: gdb not responding on Emacs from CVS
       [not found]   ` <mailman.720.1245172650.2239.bug-gnu-emacs@gnu.org>
@ 2009-06-16 21:40     ` Baoqiu Cui
  2009-06-21 12:47       ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Baoqiu Cui @ 2009-06-16 21:40 UTC (permalink / raw
  To: gnu-emacs-bug

Baoqiu Cui <cbaoqiu@yahoo.com> writes:

> After typing in ``pwd<RET>'', gdb-debug-log has the following value
> (from which you can see the GDB version that I use):
>
> ------------------------------------------------------------------------
> gdb-debug-log is a variable defined in `gdb-ui.el'.
> Its value is 
> ((recv . "(gdb) ")
>  (recv . "Using host libthread_db library \"/lib64/tls/libthread_db.so.1\".\n")
>  (recv . "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-unknown-linux-gnu\"...\n")
>  (recv . "GNU gdb 6.7.1\nCopyright (C) 2007 Free Software Foundation, Inc.\n"))
> ------------------------------------------------------------------------
>
> It seems that the Return key was ignored.  After pressing C-c C-c, the
> value of gdb-debug-log becomes:
>
> ------------------------------------------------------------------------
> gdb-debug-log is a variable defined in `gdb-ui.el'.
> Its value is 
> ((recv . "(gdb) ")
>  (recv . "Quit\n")
>  (recv . "(gdb) ")
>  (recv . "Using host libthread_db library \"/lib64/tls/libthread_db.so.1\".\n")
>  (recv . "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-unknown-linux-gnu\"...\n")
>  (recv . "GNU gdb 6.7.1\nCopyright (C) 2007 Free Software Foundation, Inc.\n"))
> ------------------------------------------------------------------------

Here is some more information.  It seems that this problem has something
to do with the size of the program that I am trying to debug.  If I try
to follow the same steps for a small testing program, everything is
fine.

I noticed that, for the big program that I was debugging, it took about
50 seconds to have the "[initializing...]" Debugger status in mode-line
changed to "[ready]".  GDB simply does not respond to user's commands
before it is *ready*.

I tried the same thing on Emacs 21, which does not report status like
[initializing...] or [ready], and it seems that GDB interface there is
much faster.  It only takes 10-15 seconds to load the same big program
and then display the "(gdb) " prompt.  Once the prompt is displayed, GDB
is *ready* to respond any command I type in.

Why does it take 50 seconds to "initialize" things?  Emacs 22 seems to
have the same "delay".  Is there anyway to cut the time spent on
initializing?

Thanks,
Baoqiu






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

* bug#3585: gdb not responding on Emacs from CVS
  2009-06-16 21:40     ` Baoqiu Cui
@ 2009-06-21 12:47       ` Nick Roberts
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Roberts @ 2009-06-21 12:47 UTC (permalink / raw
  To: Baoqiu Cui, 3585; +Cc: gnu-emacs-bug

 > Here is some more information.  It seems that this problem has something
 > to do with the size of the program that I am trying to debug.  If I try
 > to follow the same steps for a small testing program, everything is
 > fine.
 > 
 > I noticed that, for the big program that I was debugging, it took about
 > 50 seconds to have the "[initializing...]" Debugger status in mode-line
 > changed to "[ready]".  GDB simply does not respond to user's commands
 > before it is *ready*.
 > 
 > I tried the same thing on Emacs 21, which does not report status like
 > [initializing...] or [ready], and it seems that GDB interface there is
 > much faster.  It only takes 10-15 seconds to load the same big program
 > and then display the "(gdb) " prompt.  Once the prompt is displayed, GDB
 > is *ready* to respond any command I type in.
 > 
 > Why does it take 50 seconds to "initialize" things?  Emacs 22 seems to
 > have the same "delay".  Is there anyway to cut the time spent on
 > initializing?

Emacs 22 builds a list of filenames from GDB that were used to build the
executable and this takes a long time if you have an executable that was
created from a large number of files, particularly if you use stabs debug
format.  There is an option, gdb-create-source-file-list, which when set to
nil means that Emacs doesn't build this list at start up.  That makes it
quicker but if there are relevant files in existing buffers or you visit them
they won't be enabled for debugging, e.g., you won't be able to click in the
fringe to set a breakpoint until execution has already stopped there.

This option has been around since 2008-07-01.  If your Emacs predates this then
you might like to get Emacs 23.1 which will be released shortly.

Alternatively you can get the Emacs 21 speed/behavior by using M-x gud-gdb.


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





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

end of thread, other threads:[~2009-06-21 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16  2:57 bug#3585: gdb not responding on Emacs from CVS Baoqiu Cui
2009-06-16 12:58 ` Nick Roberts
     [not found] ` <mailman.714.1245158249.2239.bug-gnu-emacs@gnu.org>
2009-06-16 17:00   ` Baoqiu Cui
     [not found]   ` <mailman.720.1245172650.2239.bug-gnu-emacs@gnu.org>
2009-06-16 21:40     ` Baoqiu Cui
2009-06-21 12:47       ` Nick Roberts

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.