I have tried lots of stuff but i can't get it working, i have also found a Thread in this Forum about it but it didn't describe how the program has to be run ect.
My issue is that i want to run a program with multiple arguments eg.
./myprog arg1 arg2 arg3 arg4 arg5
with dbx, but i cant get it working...
This was the Thread i mentioned:
Can somebody give me an example ?
Thanks would be awesome,
Alcatros
Just use the run command followed by the arguments you want to pass.
I have tried going into dbx
dbx
then i enter
run programname argument
it says: cannot read run programname argument
Any Ideas?
Sure. "run" expects the program's arguments but not the program name itself which should be passed to the dbx command.
Thank you very much! i executed "dbx programname" after this "run arg1 arg2" and it actually runs, i tried to put in a breakpoint beforehand why doesn't it stop & why do i see the program output instead of the "debugger"? The only way i can go into it properly is Ctrl+C. Thanks for the response already!
Please post you whole dbx session output (enclosed with code tags).
[alcatros@system_one] dbx MyProgram
Type 'help' for help.
reading symbolic information ...
(dbx) file myprog.cpp
(dbx) stop at 52
[1] stop at "myprog.cpp":52
(dbx) run 0 ARG
Thats what i enter and then the programs runs but i cant debug it ...
The program might never pass through line 52. Start with:
stop in main
That really worked, Thank you :-)!