This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: help me reduce typing when running gdb
- From: Michael Snyder <msnyder at specifix dot com>
- To: Chris Stankevitz <cstankevitz at toyon dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 28 Nov 2007 12:09:41 -0800
- Subject: Re: help me reduce typing when running gdb
- References: <474DC4C9.7000806@toyon.com>
On Wed, 2007-11-28 at 11:43 -0800, Chris Stankevitz wrote:
> 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.
Sure.
1. cat > .gdbinit
define myrun
run <very long list of parameters that I hate typing>
end
^D
2. gdb ./bin/debug/prog
3. myrun
4. [lots of debugger commands like c, n, s, break, etc]
5. myrun