debugging programme with parameters

Michael Elizabeth Chastain mec@shout.net
Wed May 1 07:50:00 GMT 2002


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



More information about the Gdb mailing list