如何使用 qnx 二进制文件运行 valgrind

sas*_*sim 5 valgrind arm qnx

我选择了用于 qnx 6.5 的 valgrind banary,并且能够在示例程序上运行 qnx 二进制文件,如下所示:

\n\n
# /usr/valgrind/x86/usr/bin/valgrind        \nvalgrind: no program specified\nvalgrind: Use --help for more information.\n\n# /usr/valgrind/x86/usr/bin/valgrind --version\nvalgrind-3.10.1\n# /usr/valgrind/x86/usr/bin/valgrind --tool=memcheck\nvalgrind: no program specified\nvalgrind: Use --help for more information.\n# /usr/valgrind/x86/usr/bin/valgrind --tool=memcheck ls\n==6332450== Memcheck, a memory error detector\n==6332450== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.\n==6332450== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info\n==6332450== Command: ls\n==6332450== \n==6332450== \n==6332450== \n==6332450== Valgrind is exiting:\n==6332450==   Symbols for /proc/boot/libc.so.3 are required but not found.\n==6332450==   (Suggestion: compile that binary with debug-information, or provide a separate symbol-file.)\n==6332450== \n==6332450==\n
Run Code Online (Sandbox Code Playgroud)\n\n

但是,当使用arm二进制文件(在arm处理器上编译的代码)运行相同的二进制文件时,它会抛出以下错误:

\n\n
# /usr/valgrind1/x86/usr/bin/valgrind /usr/bt \n
Run Code Online (Sandbox Code Playgroud)\n\n

(这里bt是用arm编译的二进制文件)

\n\n

valgrind:可执行文件不适用于此架构

\n\n

注意:/usr/valgrind_arm/valgrind/bin/valgrind ls\n/usr/valgrind_arm/valgrind/bin/valgrind[1]:语法错误:`^A\xc3\x9c$O4T^H' 意外

\n\n

任何建议或回应将受到高度赞赏。

\n

小智 4

因为/proc/boot/libc.so.3没有调试符号。valgrind尝试从当前工作目录运行/lib,该目录包含不同版本的libc.so.3调试符号。或者将其路径设置为

valgrind --tool=memcheck --extra-debuginfo-path=/lib <prog_name>