How to load program reading stdin and taking parameters in gdb?

前端 未结 5 856
不知归路
不知归路 2020-11-28 04:25

I have a program that takes input from stdin and also takes some parameters from command line. It looks like this:

cat input.txt > mypr         


        
5条回答
  •  鱼传尺愫
    2020-11-28 04:59

    For completeness' sake upon starting a debugging session there is also the --args option. ie)

    gdb gdbarg1 gdbarg2 --args yourprog arg1 arg2 -x arg3
    

提交回复
热议问题