This is the mail archive of the
mailing list for the GDB project.
How does GDB run a program (exec flavor)?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: GDB Users <gdb at sourceware dot org>
- Date: Thu, 9 Jun 2011 10:06:19 -0400
- Subject: How does GDB run a program (exec flavor)?
- Reply-to: noloader at gmail dot com
How does GDB run an executable in responses to the run ('r') command?
I've trying to ptrace a program for a quick-and-dirty audit. When I
start the program with execl(), the program faults. When I run the
same program under GDB, the program executes. So I'm guessing that I'm
not using the proper exec, or I'm using incorrect arguments to exec.
Also, the program might have some anti-debugging tricks. If I remove
my call `ptrace(PT_TRACE_ME, 0, 0, 0)` (after the fork, before the
exec), the program will execute.
Thanks in advance,