我选择了qnx 6.5的valgrind二进制,并能够在示例程序上运行qnx二进制文件,如下所示:
# /usr/valgrind/x86/usr/bin/valgrind
valgrind: no program specified
valgrind: Use --help for more information.
# /usr/valgrind/x86/usr/bin/valgrind --version
valgrind-3.10.1
# /usr/valgrind/x86/usr/bin/valgrind --tool=memcheck
valgrind: no program specified
valgrind: Use --help for more information.
# /usr/valgrind/x86/usr/bin/valgrind --tool=memcheck ls
==6332450== Memcheck, a memory error detector
==6332450== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6332450== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==6332450== Command: ls
==6332450==
==6332450==
==6332450==
==6332450== Valgrind is exiting:
==6332450== Symbols for /proc/boot/libc.so.3 are required but not found.
==6332450== (Suggestion: compile that binary with debug-information, or provide a separate symbol-file.)
==6332450==
==6332450==但是,当使用arm二进制文件(在arm处理器上编译的代码)运行相同的二进制文件时,它会抛出以下错误:
# /usr/valgrind1/x86/usr/bin/valgrind /usr/bt (这里的bt是用arm编译的二进制文件)
valgrind:可执行文件不适用于此架构
注意: /usr/valgrind_arm/valgrind/bin/valgrind ls /usr/valgrind_arm/valgrind/bin/valgrind1:语法错误:`^Aµ$O4T^H‘意外
任何建议或回应都将受到高度赞赏。
发布于 2017-01-30 19:40:38
因为/proc/boot/libc.so.3没有调试符号。尝试从当前工作目录/lib运行valgrind,该目录包含带有调试符号的不同版本的libc.so.3。或将其路径设置为
valgrind --tool=memcheck --extra-debuginfo-path=/lib <prog_name>
https://stackoverflow.com/questions/41453907
复制相似问题