|
From: Dario L. <la...@cs...> - 2005-12-04 15:02:07
Attachments:
valgrind.txt.gz
|
Hi all, it's the first time I'm using valgrind, so maybe it's only my fault, but I can't use memcheck with a program. I'm running on a ppc32, gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8), and I want to debug uMPS, a mips machine emulator written in C++: you can download an unofficial version a bit debugged and with autotools on http://gridacuc.web.cs.unibo.it/umps/. I've compiled it with CXXFLAGS="-g -O0", as suggested by the guide, but Valgrind don't like this program :( I've attache the long output, all the errors refers to /lib/ld-2.3.5.so and none to the code I want to debug, also the program doesn't start with this final error: iselInt64Expr(ppc32): No such tag(8) Mux0X(t79,t127,Or64(Mux0X(t73,t135,t127),1Sto64(CmpNEZ8(1Uto8(CmpNEZ32(And32(t146,And32(Or32(t23,t146),0x1:I32)))))))) vex: the `impossible' happened: iselInt64Expr(ppc32) vex storage: P 96, T total 259764292 (7241286), T curr 100220 (3237) [...] Using lackey tool, the program runs fine, but the result of valgrind is no so interesting... ==2749== Counted 0 calls to _dl_runtime_resolve() ==2749== ==2749== Executed: ==2749== BBs: 0 ==2749== guest instrs: 0 ==2749== UInstrs: 0 ==2749== ==2749== Jccs: ==2749== total: 0 ==2749== % taken: 0% ==2749== ==2749== Ratios: ==2749== guest instrs : BB = 0 : 10 ==2749== UInstrs : BB = 0 : 10 ==2749== UInstrs : x86_instr = 0 : 10 ==2749== ==2749== Exit code: 0 Then, with addrcheck I obtain: Addrcheck is currently not working, because: (a) it is not yet ready to handle the Vex IR and the use with 64-bit platforms introduced in Valgrind 3.0.0 Sorry for the inconvenience. Let us know if this is a problem for you. But this should be known :P Again, trying the cache tool I get: Cachegrind: cg_main.c:486 (handleOneStatement): Assertion 'NULL == *storeAddrExpr' failed. ==2770== at 0x70018770: vgPlain_assert_fail (in /usr/lib/valgrind/stage2) ==2770== by 0x7001876C: vgPlain_assert_fail (in /usr/lib/valgrind/stage2) ==2770== by 0x7102E48C: ??? ==2770== by 0x70075860: LibVEX_Translate (in /usr/lib/valgrind/stage2) ==2770== by 0x7002A544: vgPlain_translate (in /usr/lib/valgrind/stage2) ==2770== by 0x70045BD8: vgPlain_scheduler (in /usr/lib/valgrind/stage2) ==2770== by 0x700695D8: vgModuleLocal_thread_wrapper (in /usr/lib/valgrind/stage2) ==2770== by 0x70065FAC: (within /usr/lib/valgrind/stage2) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==2770== at 0x25483154: memset (in /lib/ld-2.3.5.so) ==2770== by 0x254773D0: _dl_map_object (in /lib/ld-2.3.5.so) ==2770== by 0x25471DF4: map_doit (in /lib/ld-2.3.5.so) ==2770== by 0x2547B630: _dl_catch_error (in /lib/ld-2.3.5.so) ==2770== by 0x25471F28: do_preload (in /lib/ld-2.3.5.so) ==2770== by 0x25474178: dl_main (in /lib/ld-2.3.5.so) ==2770== by 0x2547F18C: _dl_sysdep_start (in /lib/ld-2.3.5.so) ==2770== by 0x25472158: _dl_start_final (in /lib/ld-2.3.5.so) ==2770== by 0x254725AC: _dl_start (in /lib/ld-2.3.5.so) ==2770== by 0x25480458: _start (in /lib/ld-2.3.5.so) Just massif seems to work well, so I don't paste any output. Is it me wrong? Is it uMPS? Or... Valgrind? Thanks, Dario. -- Laera Dario Undergraduate student at Computer Science University of Bologna ICQ# 203250303 /==/ http://laera.web.cs.unibo.it Mail to: laera_at_cs.unibo.it dario_at_astec.ms |
|
From: Julian S. <js...@ac...> - 2005-12-04 15:31:47
|
ppc32 support is not good in 3.0.1 (which you used), but in the just-released 3.1.0, it is very much better. So download 3.1.0 from www.valgrind.org, build, and try that. J On Sunday 04 December 2005 15:01, Dario Laera wrote: > Hi all, > it's the first time I'm using valgrind, so maybe it's only my fault, > but I can't use memcheck with a program. > I'm running on a ppc32, gcc version 3.4.4 (Gentoo 3.4.4-r1, > ssp-3.4.4-1.0, pie-8.7.8), and I want to debug uMPS, a mips machine > emulator written in C++: you can download an unofficial version a bit > debugged and with autotools on http://gridacuc.web.cs.unibo.it/umps/. > I've compiled it with CXXFLAGS="-g -O0", as suggested by the guide, but > Valgrind don't like this program :( > I've attache the long output, all the errors refers to /lib/ld-2.3.5.so > and none to the code I want to debug, also the program doesn't start > with this final error: > > iselInt64Expr(ppc32): No such tag(8) > Mux0X(t79,t127,Or64(Mux0X(t73,t135,t127),1Sto64(CmpNEZ8(1Uto8(CmpNEZ32(And3 >2(t146,And32(Or32(t23,t146),0x1:I32)))))))) vex: the `impossible' happened: > iselInt64Expr(ppc32) > vex storage: P 96, T total 259764292 (7241286), T curr 100220 (3237) > [...] > > Using lackey tool, the program runs fine, but the result of valgrind is > no so interesting... > > ==2749== Counted 0 calls to _dl_runtime_resolve() > ==2749== > ==2749== Executed: > ==2749== BBs: 0 > ==2749== guest instrs: 0 > ==2749== UInstrs: 0 > ==2749== > ==2749== Jccs: > ==2749== total: 0 > ==2749== % taken: 0% > ==2749== > ==2749== Ratios: > ==2749== guest instrs : BB = 0 : 10 > ==2749== UInstrs : BB = 0 : 10 > ==2749== UInstrs : x86_instr = 0 : 10 > ==2749== > ==2749== Exit code: 0 > > Then, with addrcheck I obtain: > > Addrcheck is currently not working, because: > (a) it is not yet ready to handle the Vex IR and the use with 64-bit > platforms introduced in Valgrind 3.0.0 > > Sorry for the inconvenience. Let us know if this is a problem for you. > > But this should be known :P > > Again, trying the cache tool I get: > > Cachegrind: cg_main.c:486 (handleOneStatement): Assertion 'NULL == > *storeAddrExpr' failed. > ==2770== at 0x70018770: vgPlain_assert_fail (in > /usr/lib/valgrind/stage2) ==2770== by 0x7001876C: vgPlain_assert_fail > (in /usr/lib/valgrind/stage2) ==2770== by 0x7102E48C: ??? > ==2770== by 0x70075860: LibVEX_Translate (in /usr/lib/valgrind/stage2) > ==2770== by 0x7002A544: vgPlain_translate (in /usr/lib/valgrind/stage2) > ==2770== by 0x70045BD8: vgPlain_scheduler (in /usr/lib/valgrind/stage2) > ==2770== by 0x700695D8: vgModuleLocal_thread_wrapper (in > /usr/lib/valgrind/stage2) > ==2770== by 0x70065FAC: (within /usr/lib/valgrind/stage2) > > sched status: > running_tid=1 > > Thread 1: status = VgTs_Runnable > ==2770== at 0x25483154: memset (in /lib/ld-2.3.5.so) > ==2770== by 0x254773D0: _dl_map_object (in /lib/ld-2.3.5.so) > ==2770== by 0x25471DF4: map_doit (in /lib/ld-2.3.5.so) > ==2770== by 0x2547B630: _dl_catch_error (in /lib/ld-2.3.5.so) > ==2770== by 0x25471F28: do_preload (in /lib/ld-2.3.5.so) > ==2770== by 0x25474178: dl_main (in /lib/ld-2.3.5.so) > ==2770== by 0x2547F18C: _dl_sysdep_start (in /lib/ld-2.3.5.so) > ==2770== by 0x25472158: _dl_start_final (in /lib/ld-2.3.5.so) > ==2770== by 0x254725AC: _dl_start (in /lib/ld-2.3.5.so) > ==2770== by 0x25480458: _start (in /lib/ld-2.3.5.so) > > Just massif seems to work well, so I don't paste any output. > > Is it me wrong? Is it uMPS? Or... Valgrind? > > Thanks, > Dario. |
|
From: Dario L. <la...@cs...> - 2005-12-04 16:46:14
|
Julian Seward wrote: > ppc32 support is not good in 3.0.1 (which you used), but in the > just-released 3.1.0, it is very much better. So download > 3.1.0 from www.valgrind.org, build, and try that. > > J 3.1 works, thanks! Bye, Dario. -- Laera Dario Undergraduate student at Computer Science University of Bologna ICQ# 203250303 /==/ http://laera.web.cs.unibo.it Mail to: laera_at_cs.unibo.it dario_at_astec.ms |