Re: C Execution Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ponchi wrote:
Hi all,

gcc has succesfully compiled my C code without any warning and error, but
when I tried to run the program even if I waited for a long time it still
did not give any output, seems like running and running all the time. I
checked the code and there is no possibility to have an infinite loop.

On the other hand, I tried to find the problem by putting printf above all
my function, and I think the problem is about reading .txt files. I checked
the code thousands times but it is fine.

Do you have any idea why the compilation is successful but I am still having
trouble with running? May it be something about gcc, or is it just about my
code?

Debug your code?

Why not compile with debug syms turned on then use gdb to find out where it's hung by issuing a SIGINT (e.g. ^C) and see what pops out?

You can also run it through strace and see if you're blocked on a syscall.

Tom

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux