【问题标题】:gflags does not flag any binarygflags 不标记任何二进制文件
【发布时间】: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 环境变量中,gflagswindbg 在 Windows 提示符中找到。

编辑:添加已经尝试过的命令

我尝试使用以下命令进行标记:
gflags /p /enable D:\MyBinary.exe /full /protect
gflags /p /enable D:\MyBinary.exe
gflags /p /enable MyBinary.exe /full /protect
gflags /p /enable -i MyBinary.exe /full /protect
gflags /p /enable /i MyBinary.exe /full /protect
gflags -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 /protectgflags /p /enable -i MyBinary.exe /full /protectgflags /p还是没有结果
  • 通过在调试器文件夹中双击它,然后切换标志并在图像文件选项卡上输入应用程序名称,您可能会更喜欢使用 gflags 的 gui 版本
  • 我也试过用/i代替-igflags /p /enable /i MyBinary.exe /full /protect,还是不行。
  • @EdChum,实际上我确实需要在命令行中执行 gflags,这是 Jenkins 日常测试的一部分。

标签: c++ visual-studio-2013 windows-7 gflags


【解决方案1】:

在管理员提示符下,此命令有效:
D:\>gflags /p /enable MyBinary.exe /full /protect path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options mybinary.exe: page heap enabled

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-12
    • 1970-01-01
    • 2013-01-01
    • 2011-10-30
    • 1970-01-01
    • 2011-09-27
    • 2010-10-06
    相关资源
    最近更新 更多