following execve()

Justin Ferguson jnferguson@gmail.com
Tue Jul 1 04:41:00 GMT 2008


Hi,

What is the suggested method for following an execve() in an
application? I seem to remember I used to get a sigtrap, but not so
much anymore-- googling around I see that it looks like using tcatch
exec/cont/tbreak main is supposed to work, naturally it does not, the
break in main attempts to break in the original applications context,
and then it fails to be able to really do much of anything
(presumably) due to not properly attaching to the new process and not
being able to access it's memory. Then stack corruption occurs in the
target application, which causes gdb to just hang and requires me to
kill -9 it.

So how exactly am I supposed to do this?



More information about the Gdb mailing list