This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: debugging programme with parameters
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: delphiro at hetnet dot nl, gdb at sources dot redhat dot com
- Date: Wed, 1 May 2002 09:50:11 -0500
- Subject: Re: debugging programme with parameters
Use the "set args" command inside gdb:
(gdb) set args "3+(2-4)*5"
(gdb) run
"set args" is sticky; it stays from run to run.
With gdb 5.2, you can also set the arguments on the gdb command line:
% gdb --args calc "3+(2-4)*5"
Cheers,
Michael C