1

How do I pass a command line argument while starting up GDB in Linux?

view story
linux-howto

http://stackoverflow.com – I have to debug a program that has errors in it as part of my assignment. However, I must first pass command line arguments in order to solve this problem. I do: gdb -tui InsertionSortWithErrors which works but after that I don't know how to pass arguments. I used gdb -help and it says something about --args which I also tried and it didn't work. I want to be able to get the debugger+the gui and pass command line arguments. Can someone help me please? I don't think the program is really relevant to this question but I will post it up if requested. (HowTos)