简体   繁体   English

有没有比 procmon 更可靠的 Win32 系统调用跟踪方法?

[英]Is there a more reliable Win32 syscall tracing method than procmon?

I'm building a Haskell command-line application in Windows 10, and am trying to debug an issue around the Windows 260-character file path limitation by tracing system calls and seeing which ones fail.我正在 Windows 10 中构建一个 Haskell 命令行应用程序,并试图通过跟踪系统调用和查看哪些失败来调试围绕 Windows 260 字符文件路径限制的问题

I've used procmon ( https://docs.microsoft.com/en-us/sysinternals/downloads/procmon ) for this, which seems quite nice, but although it displays many related log entries, I was surprised to find that it doesn't display an entry for the particular CreateFileW call that actually exceeds 260 chars and crashes my application.我为此使用了 procmon ( https://docs.microsoft.com/en-us/sysinternals/downloads/procmon ),这看起来很不错,但是尽管它显示了许多相关的日志条目,但我很惊讶地发现它不显示实际超过 260 个字符并导致我的应用程序崩溃的特定 CreateFileW 调用的条目。

I briefly tried Win32 API Monitor ( https://www.apimonitor.com ) but couldn't make heads or tails of it;我简要地尝试了 Win32 API 监视器( https://www.apimonitor.com ),但无法做出正面或反面; it seems better suited to attaching to already-running GUI applications than command-line applications that need to be launched in a particular directory, etc.它似乎更适合附加到已经运行的 GUI 应用程序而不是需要在特定目录中启动的命令行应用程序等。

Is there a better alternative to these, or a better approach?有没有比这些更好的选择,或者更好的方法?

@RemyLebeau's answer is the one I needed: @RemyLebeau 的答案是我需要的答案:

Is there a more reliable Win32 syscall tracing method than procmon? 有没有比 procmon 更可靠的 Win32 系统调用跟踪方法?

and my eventual solution to the problem that inspired this was to upgrade from base-4.11 to base-4.12 which handles windows paths > 260 chars better.我对激发这个问题的最终解决方案是从base-4.11升级到base-4.12 ,它可以更好地处理windows路径> 260个字符。

I don't think I'd even need the registry switch anymore.我认为我什至不再需要注册表开关了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM