Is there any way to tell gdb to wait for a process to start and attach to it?

后端 未结 6 1767
独厮守ぢ
独厮守ぢ 2020-12-24 01:44

I have a process that is called by another process which is called by another process and so on ad nauseum. It\'s a child process in a long tool chain.

This process

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 02:13

    On Mac OS X, you can use:

    (gdb) attach --waitfor 
    

    but this also is sometimes unable to capture processes that exit very quickly. I'm unsure if this is supported on any other platforms.

    GDB Release Notes for Mac OS X v10.5 WWDC Seed

提交回复
热议问题