Invoke gdb to automatically pass arguments to the program being debugged

前端 未结 8 1956

I\'d like to write a script that (under certain conditions) will execute gdb and automatically run some program X with some set of arguments Y. Once the program has finishe

8条回答
  •  难免孤独
    2020-12-23 00:37

    With bash you can create a script that give user like input to any executable you're executing:

    #!/bin/sh
    gdb X <

提交回复
热议问题