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


>>>>> "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


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