【发布时间】:2016-02-26 17:48:36
【问题描述】:
我正在尝试在由Visual Studio 2013 构建的Release x64 二进制文件上运行gflags x64 以检测访问冲突。
我从 Microsoft 网站下载了 Windows 调试工具。
我将C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 添加到我的PATH 环境变量中,gflags 和windbg 在 Windows 提示符中找到。
编辑:添加已经尝试过的命令
我尝试使用以下命令进行标记:gflags /p /enable D:\MyBinary.exe /full /protectgflags /p /enable D:\MyBinary.exegflags /p /enable MyBinary.exe /full /protectgflags /p /enable -i MyBinary.exe /full /protectgflags /p /enable /i MyBinary.exe /full /protectgflags -p -enable -i MyBinary.exe -full -protect
然后我想检查二进制是否正确标记为gflags /p
MyBinary.exe 未列出,gflags /p 不显示任何内容。
我通过禁用UAC 重试,看看它是否不同,没有更好的结果。
我还尝试标记另一个二进制文件 (notepad++.exe),仍然没有标记。
我的命令有什么问题?
【问题讨论】:
-
尝试不使用路径
gflags /p /enable MyBinary.exe /full /protect也不应该使用-i来指定imageFileName 吗?gflags /p /enable -i MyBinary.exe /full /protect? -
刚试过
gflags /p /enable MyBinary.exe /full /protect和gflags /p /enable -i MyBinary.exe /full /protect,gflags /p还是没有结果 -
通过在调试器文件夹中双击它,然后切换标志并在图像文件选项卡上输入应用程序名称,您可能会更喜欢使用 gflags 的 gui 版本
-
我也试过用
/i代替-i,gflags /p /enable /i MyBinary.exe /full /protect,还是不行。 -
@EdChum,实际上我确实需要在命令行中执行 gflags,这是 Jenkins 日常测试的一部分。
标签: c++ visual-studio-2013 windows-7 gflags