Debugging problem with GDB