[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I make GDB run faster on a large program with lots of shared
From: |
Charles A. Roelli |
Subject: |
Re: How can I make GDB run faster on a large program with lots of shared libraries? |
Date: |
Sun, 28 May 2017 20:09:57 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 24/05/2017 14:49, John Yates wrote:
I have discovered gdb-create-source-file-list. Disabling this does
make the start up faster but seem to make the general session more
sluggish and less interactive. Is there a reason that this list could
not be one of the artifacts delivered by my build process?
The list could be created by the build process. Not sure it would be
a lot of help, though.
The reason gdb-mi requests the source file list is to run
`gdb-init-buffer' in any buffer that contains one of those files.
This function sets up the toolbar and gud-minor-mode, and if
gud-tooltip-mode is on, does some processing of macros in the
source file:
(defun gdb-init-buffer ()
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
(set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
(when gud-tooltip-mode
(make-local-variable 'gdb-define-alist)
(gdb-create-define-alist)
(add-hook 'after-save-hook 'gdb-create-define-alist nil t)))
(see `gdb-create-define-alist' as well).
If you've been using gud-tooltip-mode, then, turning it off will speed
up startup. If that doesn't help, benchmark gdb's
"-file-list-exec-source-files" command and see if it's worth caching
the result in Elisp to save some time.