首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用qnx二进制文件运行valgrind

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

Stack Overflow用户
提问于 2017-01-04 07:24:41
回答 1查看 2.1K关注 0票数 3

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

代码语言:javascript
复制
# /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处理器上编译的代码)运行相同的二进制文件时,它会抛出以下错误:

代码语言:javascript
复制
# /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‘意外

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

EN

回答 1

Stack Overflow用户

发布于 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>

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41453907

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档