How to trace a program from its very beginning without running it as root

前端 未结 7 1557
我在风中等你
我在风中等你 2021-02-04 09:44

I\'m writing a tool that calls through to DTrace to trace the program that the user specifies.

If my tool uses dtrace -c to run the program as a subprocess of DTrace, no

7条回答
  •  生来不讨喜
    2021-02-04 10:00

    If the other answer doesn't work for you, can you run the program in gdb, break in main (or even earlier), get the pid, and start the script? I've tried that in the past and it seemed to work.

提交回复
热议问题