This is the mail archive of the
mailing list for the GDB project.
Re: Trace each statement
On Sat, Dec 18, 2010 at 10:19 AM, Doug Evans <email@example.com> wrote:
> On Thu, Dec 16, 2010 at 3:37 AM, Haitao Dan <firstname.lastname@example.org> wrote:
>> Dear All,
>> Is there a way to output the execution path of the run of a c program using GDB?
>> Thank you very much!
> This is a simplistic example that can be built on if you want.
Heh, setting aside the fact that I can't cut-n-paste very well.
> $ gcc -g trace-prog.c -o trace-prog
> $ ./gdb --batch -q -x trace-prog.gdb trace-prog.x32
Add or remove the .x32 suffix as you wish.