help-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Kevin Rodgers
Subject: Re: how automate these steps in STARTING debuggers??? (gdb, pdb, etc.)
Date: Mon, 08 Sep 2003 15:17:56 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

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.


--
Kevin Rodgers



reply via email to

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