- Start GDB with given program
gdb myProgram.a - Set break points etc.
- Start debugging and give parameters you would usually give to program here
run param1 param2
--args flag:gdb --args myProgram.a param1 param2 Cheatsheet for GDB command line: http://www.yolinux.com/TUTORIALS/GDB-Commands.html
Source: http://bytes.com/topic/c/answers/833755-how-do-i-pass-argument-gdb
No comments:
Post a Comment