|
From: Zvi V. <ver...@gm...> - 2010-01-11 20:31:37
|
Hi all, I installed valgrind 3.5.0 on embedded x86 that runs vanilla 2.6.27.35 with busybox utilities. The toolchain I used was created using crosstool-ng 1.5.2 When I ran 'valgrind ln -l' I got: valgrind: failed to start tool 'memcheck' for platform 'x86-linux': no such file or directory What can be the reason for such an error ? Are there any preconditions for valgrind install ? Thanks, Zvika |
|
From: tom f. <tf...@al...> - 2010-01-13 05:16:25
|
Zvi Vered <ver...@gm...> writes:
> When I ran 'valgrind ln -l' I got:
> valgrind: failed to start tool 'memcheck' for platform 'x86-linux': no
> such file or directory
>
> What can be the reason for such an error ?
AFAIK, "valgrind" is only a thin wrapper whose job it is to effectively
or exactly LD_PRELOAD a library which intercepts relevant symbols. My
guess is that, for whatever reason, your install is lacking the shared
object which is supposed to be preloaded.
I would first start looking in ${PREFIX}/lib/valgrind. Among
other things, I have both a "memcheck-amd64-linux" and a
"vgpreload_memcheck-amd64-linux.so". Do you have a corresponding
program and s.o. for x86?
Cheers,
-tom
|
|
From: Tom H. <to...@co...> - 2010-01-13 08:47:55
|
On 13/01/10 05:18, tom fogal wrote:
> Zvi Vered<ver...@gm...> writes:
>> When I ran 'valgrind ln -l' I got:
>> valgrind: failed to start tool 'memcheck' for platform 'x86-linux': no
>> such file or directory
>>
>> What can be the reason for such an error ?
>
> AFAIK, "valgrind" is only a thin wrapper whose job it is to effectively
> or exactly LD_PRELOAD a library which intercepts relevant symbols. My
> guess is that, for whatever reason, your install is lacking the shared
> object which is supposed to be preloaded.
The LD_PRELOAD is a fairly minor thing these days - it's main job is to
detect what the architecture of the program being loaded is, and what
tool has been requested, and exec the right valgrind tool binary.
> I would first start looking in ${PREFIX}/lib/valgrind. Among
> other things, I have both a "memcheck-amd64-linux" and a
> "vgpreload_memcheck-amd64-linux.so". Do you have a corresponding
> program and s.o. for x86?
Indeed, it should be execing memcheck-x86-linux in this case.
The problem is almost certainly that either that program has not been
copied over or it has been placed at a different location in the
filesystem so valgrind can't find it. If valgrind is run with -d it
should report something like:
--11640:1:launcher no tool requested, defaulting to 'memcheck'
--11640:1:launcher selected platform 'amd64-linux'
--11640:1:launcher launching /usr/lib64/valgrind/memcheck-amd64-linux
which shows the path of the program it is trying to launch.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <n.n...@gm...> - 2010-01-21 02:35:42
|
On Wed, Jan 13, 2010 at 7:47 PM, Tom Hughes <to...@co...> wrote: >> AFAIK, "valgrind" is only a thin wrapper whose job it is to effectively >> or exactly LD_PRELOAD a library which intercepts relevant symbols. My >> guess is that, for whatever reason, your install is lacking the shared >> object which is supposed to be preloaded. > > The LD_PRELOAD is a fairly minor thing these days - it's main job is to > detect what the architecture of the program being loaded is, and what > tool has been requested, and exec the right valgrind tool binary. It's also used for replacing functions, which is very important for some tools. Nick |
|
From: Tom H. <to...@co...> - 2010-01-21 09:53:05
|
On 21/01/10 02:34, Nicholas Nethercote wrote: > On Wed, Jan 13, 2010 at 7:47 PM, Tom Hughes<to...@co...> wrote: >>> AFAIK, "valgrind" is only a thin wrapper whose job it is to effectively >>> or exactly LD_PRELOAD a library which intercepts relevant symbols. My >>> guess is that, for whatever reason, your install is lacking the shared >>> object which is supposed to be preloaded. >> >> The LD_PRELOAD is a fairly minor thing these days - it's main job is to >> detect what the architecture of the program being loaded is, and what >> tool has been requested, and exec the right valgrind tool binary. > > It's also used for replacing functions, which is very important for some tools. That's the preload's job, yes. Reading it back my message was badly written - the "it's" in my message referred to the launcher and I was describing the launcher's job. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |