Re: [linux-audio-dev] Memory Debugger

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Memory Debugger
From: Josh Green (jgreen_AT_users.sourceforge.net)
Date: Thu May 23 2002 - 12:10:18 EEST


On Wed, 2002-05-22 at 20:48, Paul Davis wrote:
> >
> >I just recently had the need for a good malloc debugger. I tried about 3
> >different solutions and didn't like the results I got with any of them.
> >I eventually solved my problem with a gdb hardware memory watch. I wish
> >I had thought of that first. efence seems like it might work for me, but
> >it has problems with multiple threads or something, because I kept on
> >getting a SIGILL signal (Illegal Instruction) within the efence code and
> >could get no trace back in GDB. Its also horrendously slow. Perhaps I
> >just didn't know what I was doing, if anyone has any tips for using
> >efence or a better solution, please enlighten me :)
>
> efence used to be thread-unsafe. newer versions (not sure which ones)
> are now thread safe. this has changed within about the last 6 months,
> i think.
>
> i find dmalloc better than efence, though it has so many options that
> it can be hard to know where to start sometimes. it will also be very
> slow if you use the "kitchen-sink" settings, but for many things a
> subset of the full set of checks will find problems quickly.
>

I don't think I've tried dmalloc yet. I might not make the effort
either, since I think valgrind is just what I need.

> i find the x86 hardware watchpoint way, way, way too slow to be
> useful, most of the time. on some hard problems in non-RT code, its
> the only way. in RT code, its worse than useless :(
>
> --p
>

Really? I remember reading an Intel Pentium manual a while ago and
drooling over the debug registers. I thought code execution was only
slowed down when one wanted to trap the problem at the exact
instruction. If it was not in this mode then the CPU exception would
occur possibly several instructions after the fact. Anyways. Perhaps GDB
only uses the first mode mentioned. Cheers.
        Josh Green


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu May 23 2002 - 12:11:00 EEST