[Top][All Lists]

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

Re: how automate these steps in STARTING debuggers??? (gdb, pdb, etc.)

From: Christian Seberino
Subject: Re: how automate these steps in STARTING debuggers??? (gdb, pdb, etc.)
Date: 10 Sep 2003 17:52:52 -0700


Thanks for all your replies to my questions.  This is all great info.
I tried to set gud-key-prefix and was not able to do it.  Is there
some special way to set this variable that is unlike other variables???

Here is one attempt to set variable:

 (setq-default        gud-key-prefix           "C-x" )

Here is the error message when I start gdb:

 Key sequence C - x C-l uses invalid prefix characters

This is odd since I'm not even altering gud-key-prefix
from its original value!?!?


Kevin Rodgers <address@hidden> wrote in message news:<address@hidden>...
> Christian Seberino wrote:
> > I am trying to start to learn to use C and Python debuggers in Emacs.
> > 
> > This requires M-x followed by the name of the debugger..... gdb or pdb.
> > 
> > I noticed gdb/pdb then ask for filename you want to debug.  It seems this 
> > could
> > be automated or at least ASSUMED to be the same file currently in buffer.
> > Is this possible??
> (defadvice gdb (before debug-visited-file activate)
>    "When called interactively, provide the visited file name as a default 
> argument."
>    (interactive (list (gud-query-cmdline 'gdb
>                                          (if buffer-file-name
>                                              (file-name-nondirectory
>                                               buffer-file-name))))))
> > Also, can I do all this gdb/pdb stuff in a new frame/window so it doesn't
> > impact file I'm editing??
> (let ((gud-buffer-name-regexp "\\*gud-.*\\*\\(\\|<[0-9]+>\\)"))
>   (setq special-display-buffer-regexps
>         (cons gud-buffer-name-regexp special-display-buffer-regexps))
>   (setq same-window-regexps
>         (delete gud-buffer-name-regexp same-window-regexps)))
> > Lastly, I redefined C-x in .emacs and this causes an error with gdb and pdb.
> That's a bad idea, because C-x is a prefix character.
> > Is there any hope to make them both not conflict???
> Try customizing the gud-key-prefix variable.

reply via email to

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