[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: board AI update
On Mon, Mar 25, 2002 at 02:11:19PM -0500, capmikee@home.martnet.com was heard to say:
> I don't know much about Unix/C debugging tools. Mostly I use print
> statements, but that hasn't gotten me so far with this problem- I
> haven't been able to pin down a specific point where it fails.
gdb tends to suck for C++, although it's usable for C. There are some
graphical frontends too (ddd and insight, I think?)
For weird segfaults you could try electric-fence, which can help you catch
problems like references to freed memory.
> I wonder if there's a memory leak. Can anyone suggest some tools for
> debugging memory problems?
The program "gmemusage" shows you a realtime display of memory
usage. If there's a leak triggered by an interactive event (eg:
"I click on the button and it leaks 5MB"), this is a good way to
find it.
Daniel
--
/-------------------- Daniel Burrows <dburrows@brown.edu> --------------------\
| Voodoo Programming: Things programmers do |
| that they know shouldn't work but they try |
| anyway, and which sometimes actually work, |
| such as recompiling everything. |
\---- News without the $$ -- National Public Radio -- http://www.npr.org ----/