|
From: Diego D. <die...@ri...> - 2010-08-11 18:10:04
|
Hi, I'm trying to use valgrind on ARM. I checkout the SVN version yesterday and cross compile it for my ARM 926EJ (armv5, not sure if the fact that the port seems to be tested on a armv7 may be an issue). I'm using trunk checkout from yesterday. I had to modify the file exp-ptrcheck/h_main.c due __NR_ioperm not defined on the ARM kernel (I added a conditional test for compilation). When I try to run memcheck I got a segfault. I generate a core file and debug the backtrace (attached). Any suggestion on what's going on? I'm willing to help improve valgrind on ARM v5 (if is not supported), but I would need some pointers on what are the v7 specific stuff I may have to take a look at. Thanks for the help Diego. (gdb) core memcheck-arm-li.core warning: core file may not match specified executable file. Core was generated by `valgrind --tool=memcheck gst-launch'. Program terminated with signal 11, Segmentation fault. [New process 1071] #0 read_leb128 (data=0x403e074 <Address 0x403e074 out of bounds>, length_return=0x388bb5cc, sign=1413) at m_debuginfo/readdwarf.c:221 221 byte = * data ++; (gdb) bt #0 read_leb128 (data=0x403e074 <Address 0x403e074 out of bounds>, length_return=0x388bb5cc, sign=1413) at m_debuginfo/readdwarf.c:221 #1 0x3809c6e4 in read_leb128U (data=0x388bb68c) at m_debuginfo/readdwarf.c:247 #2 0x380a0374 in vgModuleLocal_read_debuginfo_dwarf3 (di=0x401c91d, debug_info_img=<value optimized out>, debug_info_sz=<value optimized out>, debug_abbv_img=0x403e074 <Address 0x403e074 out of bounds>, debug_abbv_sz=36, debug_line_img=0x401e098 <Address 0x401e098 out of bounds>, debug_line_sz=368, debug_str_img=0x0, debug_str_sz=0) at m_debuginfo/readdwarf.c:1041 #3 0x38056208 in vgModuleLocal_read_elf_debug_info (di=0x61da81c8) at m_debuginfo/readelf.c:2102 #4 0x38051fe4 in vgPlain_di_notify_mmap (a=69632, allow_SkFileV=<value optimized out>) at m_debuginfo/debuginfo.c:818 #5 0x3802de0c in valgrind_main (argc=<value optimized out>, argv=<value optimized out>, envp=0x0) at m_main.c:1977 #6 0x38030fa0 in _start_in_C_linux (pArgc=0xbee58e40) at m_main.c:2814 #7 0x00000000 in ?? () |
|
From: Julian S. <js...@ac...> - 2010-08-12 08:46:27
|
ARMv7 is the baseline requirement, and realistically I don't think v5 is likely to be supported. It won't work as-is. > Program terminated with signal 11, Segmentation fault. > [New process 1071] > #0 read_leb128 (data=0x403e074 <Address 0x403e074 out of bounds>, > length_return=0x388bb5cc, sign=1413) at m_debuginfo/readdwarf.c:221 > 221 byte = * data ++; That said, it looks like your build segfaulted while reading Dwarf3 debug info. Which has nothing to do with the v5 vs v7 question. Not sure why. Which compiler produced the executable/shared object that it was examining at the time? Running Valgrind with -v will tell you that. J |