gdb - The GNU DeBugger

gdb is a full featured debugger, which will help you to really trace a program step by step.