Invoke gdb to automatically pass arguments to the program being debugged

前端 未结 8 1902

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:29

    there is option -x, e.g.

    gdb -x gdb_commands exe_file
    

    where gdb_commands can be for example (in the case of android emulator):

    target remote :5039
    

提交回复
热议问题