Hi,
The program I need to debug starts up as part of another sequence of operations. So it isn’t the 1st process that starts up, and hence I can’t tell GDB to start a new instance, neither can I tell it to attach to an existing process because it only starts up later at a non-deterministic time.
I know that attaching to `pidof <program_name>’ works, but is there a way to let VGDB/GDB wait around and attach to a process the instance it starts up?
I’ve seen some hacks where one creates an infinite loop in the program, then once it starts up, attach to it and then use the debugger to break it out of the loop. But there has to be a better way.
This would be similar to what the VS plugin Entrian Attach does on Windows.
-
This topic was modified 8 years, 2 months ago by BitFlipper.