This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: help me reduce typing when running gdb


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]