Have you tried to run it thro' gdb?