Re: debugging & gnibbles ai



Luke Page wrote:
I have created a gnibbles ai.. it still has a long way to go.. e.g. if
you get a diamond the ai gets very confused and it ignores all
cherry's and icecreams.

The main problem is that it sometimes crashes at a certain point and
it would help me if I knew what function it was in... I output
g_printf's but I think they output slower than the program and then
stop when it crashes.

Being new to linux programming, can anyone reccomend any debugging
tools that could be used with this application?

You probably want to use GDB, the GNU debugger, which will automatically stop when a segfault occurs. You can then print a backtrace, which lists the functions the program is in.

http://www.gnu.org/software/gdb/gdb.html

Sjoerd



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