public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Chris Stankevitz <cstankevitz@toyon.com>
Cc: gdb@sourceware.org
Subject: Re: help me reduce typing when running gdb
Date: Thu, 29 Nov 2007 00:03:00 -0000	[thread overview]
Message-ID: <m3fxyqkkl5.fsf@fleche.redhat.com> (raw)
In-Reply-To: <474DC4C9.7000806@toyon.com> (Chris Stankevitz's message of "Wed\, 28 Nov 2007 11\:43\:05 -0800")

>>>>> "Chris" == Chris Stankevitz <cstankevitz@toyon.com> writes:

In addition to what everybody else said...

Chris> 2. gdb ./bin/debug/prog
Chris> 3. r very long list of parameters that I hate typing

Here I frequently use:

gdb --args ./bin/debug/prog lots of parameters

This works nicely unless you have to redirect input or output.

Chris> 6. q

Don't quit.  Edit your source, rebuild, and then in gdb just 'r'.
It will reuse the arguments and will re-read the updated executable.

This isn't always foolproof.  For instance, if your OS has address
space randomization, and you have a watchpoint installed, you will
have to delete the watchpoint.  (If you're doing a lot of difficult
debugging, find out how to disable randomization.)

If you are an Emacs user, run gdb in Emacs.

Tom

  parent reply	other threads:[~2007-11-29  0:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-28 19:43 Chris Stankevitz
2007-11-28 19:57 ` ramana.radhakrishnan
2007-11-28 20:22 ` Michael Snyder
2007-11-28 21:33 ` Gordon Prieur
2007-11-28 22:55 ` Chris Stankevitz
2007-11-28 23:15 ` Andreas Schwab
2007-11-29  0:03 ` Tom Tromey [this message]
2007-11-29 11:21 ` Andrew STUBBS

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=m3fxyqkkl5.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=cstankevitz@toyon.com \
    --cc=gdb@sourceware.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).