GNU bug report logs - #3585
gdb not responding on Emacs from CVS

Previous Next

Package: emacs;

Reported by: Baoqiu Cui <cbaoqiu <at> yahoo.com>

Date: Tue, 16 Jun 2009 03:05:04 UTC

Severity: normal

Tags: notabug, wontfix

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: nickrob <at> snap.net.nz (Nick Roberts)
To: Baoqiu Cui <cbaoqiu <at> yahoo.com>, 3585 <at> debbugs.gnu.org
Cc: gnu-emacs-bug <at> moderators.isc.org
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



This bug report was last modified 13 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.