If I have a program A, which uses execve
to run program B. How can I set a breakpoint in program B's main routine if I'm debugging program A?
After a certain point in the execve routine, program B will be loaded into memory. After that I can see the symbols in the binary and the regions of memory they have been loaded into. However, to get to that point at the moment I just step through some of the execve instructions which is very fiddly and prone to mistakes.
Is there a simpler approach to this?