public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: ramana.radhakrishnan@celunite.com
To: "Chris Stankevitz" <cstankevitz@toyon.com>
Cc: gdb@sourceware.org
Subject: Re: help me reduce typing when running gdb
Date: Wed, 28 Nov 2007 19:57:00 -0000	[thread overview]
Message-ID: <1724.219.91.250.58.1196279106.squirrel@webmailindia.celunite.com> (raw)
In-Reply-To: <474DC4C9.7000806@toyon.com>

> Hi, I often perform these steps:
>
> 1. bjam
> 2. gdb ./bin/debug/prog
> 3. r very long list of parameters that I hate typing
> 4. [lots of debugger commands like c, n, s, break, etc]
> 5. up arrow many times to get back to the run command w/parms
> 6. q
> 7. vi source.cpp
> 8. goto 1
>
> Can anyone recommend a way to streamline this process?  Particularly
> Step 3 and Step 5.  In MSVC, steps 1-3 is one keystroke (F5) and step 5
> is two (SHIFT-F5, F5).

Well in gdb you could put this in a command file and then source it . Look
at the source command . Or you could put it all of them in .gdbinit file
in your home directory.

You can also define your own custom commands - so run with params can be a
command that you define using define command.

Also after the first run with params , the second run always by default
takes the params you specified in the first call to run .

 So r < huge list of params>
  ...
....
... ( do lots of debug)

r

has the same effect as replacing the r with r <huge list of params>

HTH

cheers
Ramana




cheers
Ramana

>
> Thanks for your help in switching over to gdb!
>
> Chris
>


  reply	other threads:[~2007-11-28 19:57 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 [this message]
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
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=1724.219.91.250.58.1196279106.squirrel@webmailindia.celunite.com \
    --to=ramana.radhakrishnan@celunite.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).