[ECOS] ecos & valgrind

Andrew Lunn andrew@lunn.ch
Thu Aug 30 12:13:00 GMT 2007


On Thu, Aug 30, 2007 at 01:59:17PM +0200, Guillaume Lewalle wrote:
> hello,
> 
> is it possible to use valgrind (or some other tool) with ecos ?
> 
> if yes, anything special to do ? because all test i did with it doesn't 
> work... :-(

I assume you are using the synthetic target in Linux.

I think the answer is no, it is not possible. valgrind, at least when
checking for memory leaks, will replace the glibc malloc with its
malloc. However eCos does not use the glibc malloc. It uses the eCos
malloc. valgrind has no way to replace this, since we don't even link
with glibc. Also valgrind will rely on runtime linking, ie using .so
libraries. malloc is only linked into the image at run time and it is
then that it intercepts and puts its own malloc in place. eCos is
statically linked, so there is no chance for valgrind to get its
malloc used. 


     Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list