omega_red
December 8th, 2005, 09:50
Let's say I have a driver that exposes any memory region to some user-mode caller. Now, I want to be able to match arbitrary kernel-mode (code) address with a symbol, ie function name - something like "ln" command in WinDbg. I know how to get exports from specific module. I know how to get symbols from specific PDB file. But, there are two questions:
1. For my arbitrary address, I need to know what module it belongs to. I think I can handle it, perhaps by QuerySystemInformation.
2. How to automatically download matching PDB for this module - if I just request symbols for DLL (using DbgHelp), it gives me only exports, since there is no debug data in windows release DLLs. I've found two threads here dealing with the issue from the perspective of SI. Seems like I may be able to download it from my code, but it requires creating HTTP requests with fake user-agent etc. Is there a simpler way to do it, just using DbgHelp?
Any suggestions?
1. For my arbitrary address, I need to know what module it belongs to. I think I can handle it, perhaps by QuerySystemInformation.
2. How to automatically download matching PDB for this module - if I just request symbols for DLL (using DbgHelp), it gives me only exports, since there is no debug data in windows release DLLs. I've found two threads here dealing with the issue from the perspective of SI. Seems like I may be able to download it from my code, but it requires creating HTTP requests with fake user-agent etc. Is there a simpler way to do it, just using DbgHelp?
Any suggestions?