|
From: Daniel G. <dan...@no...> - 2003-11-06 21:28:18
|
When I run any valgrind command, including 'valgrind --help', I get this error: 'Illegal Instruction' I turned on loader debugging with 'LD_DEBUG=files; export LD_DEBUG', and the last thing it was trying to do before dying was 'calling init: //lib/valgrind/valgrind.so' Any idea what is going on here? I've been pulling my hair out all day on this. Some unusual things about my system: - I am using a cross compile toolchain - Build system is an old RedHat system, athlon, gcc-2.96, libc-2.2.5. linux 2.4.20 - Host(target) system is 486, gcc-3.3.2, libc-2.3.2, linux 2.4.22 - Environmental variables CC, RANLIB, AR etc are set to cross compile equivalents. Watching the VG build I note that these tools are being used properly (with the exception of AR, which I fixed) - My target system is an embedded PC104 module on which I would like to do some debugging. - 100% of the software on the embedded system, including the linux kernel, is compiled with the cross tool chain and everything works great except for vg. Thanks in advance, Dan Goertzen dan...@no... |
|
From: Jeremy F. <je...@go...> - 2003-11-06 22:02:43
|
On Thu, 2003-11-06 at 13:28, Daniel Goertzen wrote: > Some unusual things about my system: > - I am using a cross compile toolchain > - Build system is an old RedHat system, athlon, gcc-2.96, libc-2.2.5. linux > 2.4.20 > - Host(target) system is 486, gcc-3.3.2, libc-2.3.2, linux 2.4.22 > - Environmental variables CC, RANLIB, AR etc are set to cross compile > equivalents. Watching the VG build I note that these tools are being used > properly (with the exception of AR, which I fixed) > - My target system is an embedded PC104 module on which I would like to do > some debugging. > - 100% of the software on the embedded system, including the linux kernel, > is compiled with the cross tool chain and everything works great except for > vg. Do you know if your CPU supports the CPUID instruction? What is the exact CPU model (manufacturer, etc). What does /proc/cpuinfo say? What happens if you make a change something like this: *** vg_startup.S 17 Oct 2003 13:24:40 -0000 1.18 --- vg_startup.S 6 Nov 2003 22:01:54 -0000 *************** really_start_up: *** 112,117 **** --- 112,118 ---- # cpu or not. movb $0, VG_(have_ssestate) # assume sse-disabled movl $0, %eax + jmp get_fpu cpuid cmpl $1, %eax jl get_fpu # we cant do cpuid(1) ?! J |
|
From: Daniel G. <dan...@no...> - 2003-11-06 22:38:22
|
Processor is an STPC Atlas. /proc/cpuinfo reports the model name as Cx486DX2. The cpu does not seem to have the cpuid instruction. 'valgrind --help' now succeeds. Trying to debug a program crashes with 'Illegal Instruction' again, but grepping through the code I note the cpuid is in at least one other place too... I will apply a similar fix. Thank you for your help! Dan. -----Original Message----- From: Jeremy Fitzhardinge [mailto:je...@go...] Sent: Thursday, November 06, 2003 4:03 PM To: Daniel Goertzen Cc: val...@li... Subject: Re: [Valgrind-users] vg crashes with "Illegal Instruction" On Thu, 2003-11-06 at 13:28, Daniel Goertzen wrote: > Some unusual things about my system: > - I am using a cross compile toolchain > - Build system is an old RedHat system, athlon, gcc-2.96, libc-2.2.5. linux > 2.4.20 > - Host(target) system is 486, gcc-3.3.2, libc-2.3.2, linux 2.4.22 > - Environmental variables CC, RANLIB, AR etc are set to cross compile > equivalents. Watching the VG build I note that these tools are being used > properly (with the exception of AR, which I fixed) > - My target system is an embedded PC104 module on which I would like to do > some debugging. > - 100% of the software on the embedded system, including the linux kernel, > is compiled with the cross tool chain and everything works great except for > vg. Do you know if your CPU supports the CPUID instruction? What is the exact CPU model (manufacturer, etc). What does /proc/cpuinfo say? What happens if you make a change something like this: *** vg_startup.S 17 Oct 2003 13:24:40 -0000 1.18 --- vg_startup.S 6 Nov 2003 22:01:54 -0000 *************** really_start_up: *** 112,117 **** --- 112,118 ---- # cpu or not. movb $0, VG_(have_ssestate) # assume sse-disabled movl $0, %eax + jmp get_fpu cpuid cmpl $1, %eax jl get_fpu # we cant do cpuid(1) ?! J |