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

Re: board AI update



In localhost.xarchon, you wrote:
> 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.

Another very good tool for C++ memory leak debugging is leaky, which
is part of the Mozilla tools.  However, it only detects leaks, not
invalid reference stuff (e.g. memory corruption).

Recent gdbs actually work pretty well for C++.  It's threads that are
problematic...


-- 
bryan k ogawa  <bko@idiom.com>   http://www.idiom.com/~bko/