all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lucius Fox <lucius.fox08@gmail.com>
To: David L <idht4n@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How can I specify emacs to use a specified gdb with command  parameters
Date: Fri, 20 Mar 2009 23:05:21 -0700	[thread overview]
Message-ID: <528a76e70903202305je24c60ei53f436a37225bc2@mail.gmail.com> (raw)
In-Reply-To: <b79371120903200638n2f27fea0k1c2241d9722f8a3@mail.gmail.com>

Right now, I need to do this at a shell in order to remote debug a c++ program.

$ cd /Volumne/workingdirectory
$ source ./build/envsetup.sh
$ gdb attach $pid

How can I repeat the same steps in emacs gdb?
After I type M-x gdb, i enter 'gdb attach $pid' , it just said 'gdb'
command not found .

My gdb location is setup by the script build/envsetup.sh.

Thank you for any help.


On Fri, Mar 20, 2009 at 6:38 AM, David L <idht4n@gmail.com> wrote:
> 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=3 /tmp/myexec')  in .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 ()
>>>  (interactive)
>>>  (setq gdb-many-windows nil)
>>>  (setq gdb-use-separate-io-buffer nil)
>>>  (tool-bar-mode t)
>>>  (set-fringe-mode 'default)
>>>  (gdb "/tmp/mygdb --annotate=3"))
>>>
>>> Then I assign a key to run my-gdb
>>>
>>> (global-set-key [C-f7]  'my-gdb)
>>>
>>>
>>> Cheers...
>>>
>>>              Dave
>>>
>>
>




  reply	other threads:[~2009-03-21  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-20  1:27 How can I specify emacs to use a specified gdb with command parameters Lucius Fox
2009-03-20  9:30 ` Peter Dyballa
     [not found] ` <b79371120903192216g3c20e811h308af5706f0fce13@mail.gmail.com>
     [not found]   ` <528a76e70903192247v49693f8fx2bbc12f32cbc9557@mail.gmail.com>
     [not found]     ` <b79371120903192258w444265cchde82582525592840@mail.gmail.com>
     [not found]       ` <528a76e70903192323g23505882te25c60a62b973ae@mail.gmail.com>
2009-03-20 13:38         ` David L
2009-03-21  6:05           ` Lucius Fox [this message]
2009-03-21  7:16             ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528a76e70903202305je24c60ei53f436a37225bc2@mail.gmail.com \
    --to=lucius.fox08@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=idht4n@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.