This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
following execve()
- From: "Justin Ferguson" <jnferguson at gmail dot com>
- To: gdb at sourceware dot org
- Date: Tue, 1 Jul 2008 04:40:54 +0000
- Subject: following execve()
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?