From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help Subject: finally getting gdb to work? Date: Thu, 22 Jul 2010 10:04:54 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1279785944 18078 80.91.229.12 (22 Jul 2010 08:05:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Jul 2010 08:05:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 22 10:05:41 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Obqmi-0008I5-Q8 for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jul 2010 10:05:41 +0200 Original-Received: from localhost ([127.0.0.1]:52460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Obqmi-0000dP-AT for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jul 2010 04:05:40 -0400 Original-Received: from [140.186.70.92] (port=58787 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObqmC-0000dH-WB for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 04:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObqmB-0007Ls-9F for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 04:05:08 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:45725) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObqmB-0007Li-1d for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 04:05:07 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Obqm9-000847-1m for help-gnu-emacs@gnu.org; Thu, 22 Jul 2010 10:05:05 +0200 Original-Received: from xdsl-89-0-20-152.netcologne.de ([89.0.20.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jul 2010 10:05:05 +0200 Original-Received: from andrea.crotti.0 by xdsl-89-0-20-152.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jul 2010 10:05:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-89-0-20-152.netcologne.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Cancel-Lock: sha1:+eDbYkx7GHQBPtefGuyoVaofUhs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74218 Archived-At: I don't understand what happens here, yesterday for the first time I saw how I should be supposed to debug in emacs (with gdb). It was great, jumping, easily set breakpoints and so on. By default this "gdb-many-windows" is nil and until I didn't set it to "t" I thought that text-mode stuff was all I was getting. After some other time and trying also out pdb then nothing works anymore! When I run M-x gdb test I don't anymore the windows set, and if I call gdb-restore-windows I don't get a working debug environment anyway (only the windows set). Here is my very simple conf --8<---------------cut here---------------start------------->8--- #+begin_src emacs-lisp :tangle yes (setq gdb-show-main nil) (setq gdb-many-windows t) #+end_src *** Some advices for pdb #+begin_src emacs-lisp :tangle yes (defadvice pdb (before gud-query-cmdline activate) "Provide a better default command line when called interactively." (interactive (list (gud-query-cmdline 'pdb.py (file-name-nondirectory buffer-file-name))))) #+end_src --8<---------------cut here---------------end--------------->8--- Anyone has an idea? Ah another thing, I also have to debug some code which compiles only on a virtual machine, which I can access via ssh. Now I work on it via sshfs, but I would like to debug it directly. Is there some way to automate the debugging process from another machine (with gdbserver or tramp maybe?)? Thanks a lot