* configuring gdb (gud) to start on a given file
@ 2005-03-29 9:24 Dan Hitt
2005-03-29 22:16 ` Kevin Rodgers
0 siblings, 1 reply; 4+ messages in thread
From: Dan Hitt @ 2005-03-29 9:24 UTC (permalink / raw)
When i start gdb the first time in an emacs session, it prompts
Run gdb (like this): gdb
After running it once, it remembers what the previous executable.
How can i get the gdb (gud) mode to either remember between
emacs sessions, or set a default executable and/or gdb command
in my .emacs file?
I'm running 21.2.1, as distributed in Mac OSX, 10.3.2.
Thanks in advance for any info, including pointers to info
pages or man pages or FAQs.
dan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: configuring gdb (gud) to start on a given file
2005-03-29 9:24 configuring gdb (gud) to start on a given file Dan Hitt
@ 2005-03-29 22:16 ` Kevin Rodgers
2005-03-30 9:50 ` Dan Hitt
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2005-03-29 22:16 UTC (permalink / raw)
Dan Hitt wrote:
> When i start gdb the first time in an emacs session, it prompts
> Run gdb (like this): gdb
>
> After running it once, it remembers what the previous executable.
>
> How can i get the gdb (gud) mode to either remember between
> emacs sessions, or set a default executable and/or gdb command
> in my .emacs file?
Try this:
(setq gud-gdb-history '("gdb /path/to/default/executable"))
> I'm running 21.2.1, as distributed in Mac OSX, 10.3.2.
>
> Thanks in advance for any info, including pointers to info
> pages or man pages or FAQs.
`C-h f gdb RET', then click on the `gud' library; you'll see that it
calls (gud-query-cmdline 'gdb) to read its arguments, and that the
default is the first element of the (gud-symbol 'history nil 'gdb)
symbol's value.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 4+ messages in thread
* configuring gdb (gud) to start on a given file
@ 2005-03-29 22:59 Nick Roberts
0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2005-03-29 22:59 UTC (permalink / raw)
Cc: help-gnu-emacs
> How can i get the gdb (gud) mode to either remember between
> emacs sessions, or set a default executable and/or gdb command
> in my .emacs file?
I don't think you can do this in 21.2 but in the "soon-to-be-released"
Emacs 22 you can set or customise gud-gdb-command-name eg in your .emacs
put:
(setq gud-gdb-command-name "gdb --annotate=3 /home/nick/myprog")
However this is not really how it is generally used because one day
you might want to debug another program!
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: configuring gdb (gud) to start on a given file
2005-03-29 22:16 ` Kevin Rodgers
@ 2005-03-30 9:50 ` Dan Hitt
0 siblings, 0 replies; 4+ messages in thread
From: Dan Hitt @ 2005-03-30 9:50 UTC (permalink / raw)
Hi Kevin and Nick,
Thanks for the advice on how to proceed. Kevin's method works,
and no doubt Nick's will in emacs 22. (And i do run gdb on
lots of programs, but i've had to do it a great deal on this
program whose path is very long.)
dan
In article <3au2dtF62lgmdU1@individual.net>,
Kevin Rodgers <ihs_4664@yahoo.com> wrote:
> > How can i get the gdb (gud) mode to either remember between
> > emacs sessions, or set a default executable and/or gdb command
> > in my .emacs file?
>(setq gud-gdb-history '("gdb /path/to/default/executable"))
>
>`C-h f gdb RET', then click on the `gud' library; you'll see that it
>calls (gud-query-cmdline 'gdb) to read its arguments, and that the
>default is the first element of the (gud-symbol 'history nil 'gdb)
>symbol's value.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-03-30 9:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-29 9:24 configuring gdb (gud) to start on a given file Dan Hitt
2005-03-29 22:16 ` Kevin Rodgers
2005-03-30 9:50 ` Dan Hitt
-- strict thread matches above, loose matches on Subject: below --
2005-03-29 22:59 Nick Roberts
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).