为项目指定 Valgrind 设置

Projects >Build & Run >Run >Run Settings 中为套件选择的运行设备上指定运行应用程序的设置。

使用Valgrind 的工具套件,您可以检测内存泄漏并对函数执行情况进行剖析。

为当前项目指定 Valgrind 设置:

  1. Valgrind Settings 部分,选择Custom
  2. 为项目指定 Valgrind 设置。

    运行设置中的 Valgrind 设置部分

  3. Valgrind executable 中,指定 Valgrind 可执行文件的路径。
  4. Valgrind arguments 中,为 Valgrind 指定附加参数。
  5. Detect self-modifying code 中,选择是否检测自修改代码以及检测位置:仅在堆栈上检测、随处检测或除文件-后端映射外随处检测。

选择Restore Global 可还原为全局设置。

要指定 Valgrind 的全局设置,请选择首选项>Analyzer

另请参阅 "使用 Memcheck 检测内存泄漏"、"配置文件 函数执行"、"在外部应用程序上运行 Valgrind 工具"、"配置项目"、"Valgrind Callgrind ""Valgrind Memcheck"。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.