使用堆栈跟踪检测函数
我正在查看带有调试器的应用程序(我没有源代码!)。 我在某个函数(导出的函数)中放置了一个断点,然后查看堆栈跟踪。 显然我看不到符号,但我可以看到 DLL 名称和序数。
我的问题是如何判断我在堆栈跟踪中看到的函数是否已导出?或者更准确地说,我在堆栈跟踪中看到的序数是否与我在依赖遍历器中看到的序数相同?
多谢! :-)
I am looking at an application with a debugger (I don't have the source code!).
I put a breakpoint in a certain function (exported function) and I look at the stack trace.
Obviously I cannot see the symbols, but I can see the DLL name and an ordinal.
My question is how can I tell if the functions I see in the stack trace are exported ? or to be more accurate, Are the ordinals I see in the stack trace are the same ordinals I see in dependency walker?
Thanks a lot! :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TCS:我暗示这样一个事实,即有多个调试器和多个链接器可能会在 DLL 中生成不同类型的元数据。
到目前为止,我已经使用
OllyDbg
,现在好像有一个全新的2.0版本(此处)。它使代码分析成为高手(我想,如果您了解汇编语言和动态加载的方法)。它确实可以轻松跟踪哪些模块调用哪些模块并将这些(调用)映射到符号名称(如果可用)1< /a>. OllyDbg 尤其是免费的。
在商业方面,我相信有几个类似的工具,其中我记得 IDA Pro成为最大的名字。
希望有帮助。
1 它将利用调试符号(例如您可以从 Microsoft 下载的符号)它甚至会将 Win32 API 的参数转换为有意义的名称(即 WM_PAINT 而不是常量,也知道预期的 LPPARAM 布局等)。
TCS: I was hinting at the fact that there is more than one debugger, and more than one linker that may generate different type of metadata in DLL's.
To the point, I've had good 'debugging' (inspecting/auditing) third-party software (including DLL's) with
OllyDbg
, of which there now seems to be a brand-new version 2.0 (here).It makes code analysis a whizz (if you know your way around assembly language and dynamic loading, I guess). It certainly makes easy work of tracking what module calss which and mapping those (calls) to symbolic names if available1. OllyDbg in particular is free.
On the commercial front, I believe there are several similar tools, of which I recall IDA Pro to be the biggest name.
Hope that helps.
1 It will leverage debug symbols (such as the ones you can download from Microsoft) and it will even translate arguments to Win32 APIs into their meaningful names (i.e. WM_PAINT instead of a constant, knowing the expected LPPARAM layout too etc).
从 Visual Studio 命令提示符启动的命令
dumpbin \exports name.dll
将告诉您所有导出的函数。The command
dumpbin \exports name.dll
, launched from a Visual Studio Command Prompt, will tell you all exported functions.