[Top][All Lists]

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

bug#3585: gdb not responding on Emacs from CVS

From: Nick Roberts
Subject: bug#3585: gdb not responding on Emacs from CVS
Date: Mon, 22 Jun 2009 00:47:51 +1200

 > 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

reply via email to

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