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: Tom Tromey <tromey at redhat dot com>
- To: Chris Stankevitz <cstankevitz at toyon dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 28 Nov 2007 16:37:42 -0700
- Subject: Re: help me reduce typing when running gdb
- References: <474DC4C9.7000806@toyon.com>
- Reply-to: tromey at redhat dot com
>>>>> "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