From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David L Newsgroups: gmane.emacs.help Subject: Re: How can I specify emacs to use a specified gdb with command parameters Date: Fri, 20 Mar 2009 06:38:03 -0700 Message-ID: References: <528a76e70903191827s7ea90e4dicf657f3910aaf841@mail.gmail.com> <528a76e70903192247v49693f8fx2bbc12f32cbc9557@mail.gmail.com> <528a76e70903192323g23505882te25c60a62b973ae@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237556324 2989 80.91.229.12 (20 Mar 2009 13:38:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2009 13:38:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Lucius Fox Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 20 14:40:01 2009 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.50) id 1Lkex4-0000ro-0O for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Mar 2009 14:39:58 +0100 Original-Received: from localhost ([127.0.0.1]:41982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lkevh-0005js-Fc for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Mar 2009 09:38:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkevK-0005jf-VO for help-gnu-emacs@gnu.org; Fri, 20 Mar 2009 09:38:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkevG-0005j2-8C for help-gnu-emacs@gnu.org; Fri, 20 Mar 2009 09:38:10 -0400 Original-Received: from [199.232.76.173] (port=58704 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkevG-0005iz-2b for help-gnu-emacs@gnu.org; Fri, 20 Mar 2009 09:38:06 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.173]:10992) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkevF-0001Mj-Js for help-gnu-emacs@gnu.org; Fri, 20 Mar 2009 09:38:05 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 23so1205107wfg.24 for ; Fri, 20 Mar 2009 06:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Z2FrP+LdIpawTzcpA4MYOPOMvbyaWz6nW65mIfZuybk=; b=ZPVIE7O9v6aLoiCDW2bSaYP6ZBH5RuKcbPkpEP0ZetEhjpF8dKOEySbbrA88kIWOVg dgLcOXHcFd+AEXC4oGdFjzZ1ioEjYrACXHp4DH4kMQGpXssT8nKt9MEMvDxDieO0VkPh PpEPnrVcAqu9oMazbVMWF6it6+U/1krSQDKcE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=EGRtlq67L4OtWAxZoBM/Jp4dSVMIbiyoOOkIfLGY9/ZXK79+2Qakw2BBbmsovR5D1p TQ36iZg1hEvlxkRdIcaTTK2wRSXvCBLP/OtmIdjUNmh7zEArMZ4kJQVcHJzT0QFqjZ9V LX/XDQEKqu4YbOMSAcSnypVCM/Uri1RLdthUc= Original-Received: by 10.142.134.17 with SMTP id h17mr1479700wfd.348.1237556283259; Fri, 20 Mar 2009 06:38:03 -0700 (PDT) In-Reply-To: <528a76e70903192323g23505882te25c60a62b973ae@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:63133 Archived-At: On Thu, Mar 19, 2009 at 11:23 PM, Lucius Fox wrote: > Thanks. > > Another question I have is > * how does emacs knows where to pulll the source code during debugging? I think it learns it from gdb. gdb learns if from the debugging symbols in the executable. I think there is some interaction with some emacs settings because I've had situations where I've been unable to insert a breakpoint in a file by clicking in the left margin, but emacs has been able to bring me to the right line when gdb stops at a breakpoint inserted the old fashion way. > * after i open a file, how can I setup a break point at a particular line= ? If gdb is active and emacs and gdb agree that the file you've opened is a source file (usually, but not always true in my experience), you can just left click in the left margin. I'm responding on-list to this because other people might be able to give better answers. Good luck, Dave > > On Thu, Mar 19, 2009 at 10:58 PM, David L wrote: >> On Thu, Mar 19, 2009 at 10:47 PM, Lucius Fox wrote: >>> David, >>> >>> Thank you for your response. >>> Is there a way to specify what my gdb command (like in your example, >>> put '/tmp/mygdb --annotate=3D3 /tmp/myexec') =A0in .emacs file? So that= it >>> does not prompt me everytime I use M-x gdb? >> >> I do something like this in my .emacs: >> >> (defun my-gdb () >> =A0(interactive) >> =A0(setq gdb-many-windows nil) >> =A0(setq gdb-use-separate-io-buffer nil) >> =A0(tool-bar-mode t) >> =A0(set-fringe-mode 'default) >> =A0(gdb "/tmp/mygdb --annotate=3D3")) >> >> Then I assign a key to run my-gdb >> >> (global-set-key [C-f7] =A0'my-gdb) >> >> >> Cheers... >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0Dave >> >