如何在QNX平台上使用valgrind

问题描述 投票:0回答:2

根据valgrind官方文档,不支持QNX。 然而,我看到了一些关于在 QNX 上使用 valgrind 的问题。 问题1 问题2。 这让我很困惑。是否可以在 QNX 上运行 Valgrind? 如果可以的话,如何实现呢? 也许编译一个与 QNX 平台兼容的可执行文件?或者有没有办法下载正确的文件?

我在 QNX 社区找到了 Valgrind 项目我下载了软件包。 但是,它不包含我需要的有关arm64/aarch64架构的文件。

c valgrind qnx blackberry-qnx
2个回答
1
投票

您可能需要下载源代码(从这里https://community.qnx.com/sf/scm/do/listRepositories/projects.valgrind/scm)并构建它。

看起来它已经维护了 7 年了(Valgrind 3.11),所以我认为让它构建和工作将是一项巨大的努力,除非 QNX 和工具链同时没有太大变化。


0
投票

我们正在使用 QNX SDP 7.1.0,并使用提供的 valgrind 我们尝试检查示例代码的内存泄漏,但是我们面临以下问题。

    ARM64 front end: load_store
    disInstr(arm64): unhandled instruction 0x88E1FC02
    disInstr(arm64): 1000'1000 1110'0001 1111'1100 0000'0010
    ==151577== valgrind: Unrecognised instruction at address 0x17e48.
    ==151577==    at 0x17E48: ??? (in /proc/boot/ldqnx-64.so.2)
    ==151577== Your program just tried to execute an instruction that Valgrind
    ==151577== did not recognise.  There are two possible reasons for this.
    ==151577== 1. Your program has a bug and erroneously jumped to a non-code
    ==151577==    location.  If you are running Memcheck and you just saw a
    ==151577==    warning about a bad jump, it's probably your program's    fault.
    ==151577== 2. The instruction is legitimate but Valgrind doesn't handle it,
    ==151577==    i.e. it's Valgrind's fault.  If you think this is the case or
    ==151577==    you are not sure, please let us know and we'll try to fix it.
    ==151577== Either way, Valgrind will now raise a SIGILL signal which will
    ==151577== probably kill your program.
    ==151577==

We also tried to cross compile Valgrind 3.23.0 for qnx platform, and we are unable to configure because of the following error

checking for a supported OS... no (nto-qnx)
configure: error: Valgrind is operating system specific. Sorry.

How can we cross compile for QNX platform?
© www.soinside.com 2019 - 2024. All rights reserved.