|
From: Wan M. F. W. I. <wan...@mc...> - 2011-02-07 14:10:16
|
Since Valgrind use synthetic CPU, can it analyze a cross compiled programs? eg: an ARM compiled programs tested with Valgrind installed on a x86 machine. Thanks -- Wan Mohd Fairuz WAN ISMAIL |
|
From: John R. <jr...@bi...> - 2011-02-07 15:11:37
|
On 02/07/2011 06:10 AM, Wan Mohd Fairuz Wan Ismail wrote: > Since Valgrind use synthetic CPU, can it analyze a cross compiled programs? eg: an ARM compiled programs tested with Valgrind installed on a x86 machine. No. The host and the target must have the same basic architecture. The setting of the CPU integer flags (Negative, Zero, Overflow, Carry), the details of floating point computation, and the system call interface are not so easily emulated as are FETCH, STORE, ADD, OR. For the particular case of ARM vs x86, ARM has the Carry flag backwards on all subtract operations. (ARM subtract-with-borrow does not interoperate with ARM add-with-carry.) -- |
|
From: Nicholas N. <n.n...@gm...> - 2011-02-08 06:13:02
|
On Tue, Feb 8, 2011 at 1:10 AM, Wan Mohd Fairuz Wan Ismail <wan...@mc...> wrote: > Since Valgrind use synthetic CPU, can it analyze a cross compiled programs? > eg: an ARM compiled programs tested with Valgrind installed on a x86 > machine. In theory it could, because the intermediate code representation represents the full side-effects of every instruction. But in practice it doesn't, and making it do so would be a lot of work. I bet syscalls would make life difficult too. Nick |