【问题标题】:How to use Valgrind with WSL to profile a MSVC application on Windows 10?如何使用 Valgrind 和 WSL 在 Windows 10 上分析 MSVC 应用程序?
【发布时间】:2018-08-20 10:07:40
【问题描述】:

我想使用 Valgrind 分析我的应用程序,但我找不到有关如何在 Windows 上执行此操作的教程。

当我尝试使用

打开我的应用程序时
valgrind -v ./ThreadClass.exe

我明白了

valgrind: ./ThreadClass.exe: cannot execute binary file

所以错误与那些主题不同:

'Valgrind does not work with WSL?'

'How to use Valgrind on Windows'

正如“Valgrind does not work with WSL?”的答案之一所述,它应该适用于最新版本的 Windows 10(创作者更新)。

谁能向我解释一下,如何在 Windows 10 上使用 Valgrind 分析应用程序?

我是否需要为 linux 编译我的应用程序才能在 WSL(适用于 Linux 的 Windows 子系统)中使用 Valgrind 运行它?

【问题讨论】:

    标签: windows-10 valgrind windows-subsystem-for-linux


    【解决方案1】:

    WSL 中的 Valgrind 仅适用于 linux 二进制文件,不适用于 windows 二进制文件。如果你为 linux 重新编译你的二进制文件,你应该可以在上面运行 valgrind。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-22
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 2015-11-17
      相关资源
      最近更新 更多