Windbg 不显示调用堆栈源参数
我在 kernel32!LoadLibraryExW 中设置了一个断点。在调用窗口中,我切换了“源参数”,但调用堆栈在中断时仍然不显示 LoadLibraryExW 的参数。有没有一种方法可以轻松查看参数?
我已将环境变量 _NT_SYMBOL_PATH 设置为 SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
I set a breakpoint in kernel32!LoadLibraryExW. In the calls window, I have "Source args" toggled, but the call stack still doesn't show the arguments for LoadLibraryExW when it breaks. Is there a way to easily view the arguments?
I have set the environment variable _NT_SYMBOL_PATH to SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法直接将参数与切换“源参数”的函数参数进行匹配。这些仅适用于私有 PDB。
您必须切换“原始参数”并使它们符合 MSDN 的文档。
如果您需要超过 3 个参数,则必须查看从 esp 开始的内存。
这对于 32 位来说非常简单,但对于 64 位来说可能会很痛苦,因为参数可能不会实际写入堆栈(只有在需要覆盖和恢复寄存器时,它们才会通过寄存器传递并复制到堆栈) 。有关详细信息,您可以参考 http:// msdn.microsoft.com/en-us/library/ms235286(v=vs.80).aspx 如果您可以控制源代码,请在 C 编译器上使用 /homeparams 标志进行编译确保将参数复制到堆栈上以方便调试。
You can't directly match the arguments to the function parameters with 'Source Args' toggled. These are available only with private PDBs.
You have to toggle 'Raw args' and make them fit with the documentation from MSDN.
If you need more than 3 arguments you must view the memory starting at esp.
This is quite simple with 32 bits, but it may be a pain with 64 bits because the arguments may not be actually written to the stack (they are passed by registers and copied to the stack only if the registers need to be overwritten and restored). For more information, you can refer to http://msdn.microsoft.com/en-us/library/ms235286(v=vs.80).aspx If you have control on the source code, compile with the /homeparams flag on the C compiler to be sure the parameters are copied on the stack to ease debugging.
在 X64 中,前四个整数参数分别进入 rcx、rdx、r8 和 r9 寄存器。
其余的整数参数进入堆栈。
In X64, the first four integer arguments go into rcx, rdx, r8 and r9 registers respectively.
The rest of the integer arguments go on the stack.