user1090249
user1090249

Reputation:

Unable to set a bp on LoadLibraryW

I'm trying to set a break point on kernel32!LoadLibraryW or LoadLibraryA. I'm constantly getting:

Couldn't resolve error at 'kernel32!LoadLibraryW'

My symbol path is set to: srv*https://msdl.microsoft.com/download/symbols

Any ideas on how to fix that?

Upvotes: 2

Views: 1150

Answers (2)

Anders
Anders

Reputation: 101756

I believe WinDbg uses the symbol name and not the exported function name when resolving the address. This causes issues for some of the functions that are forwarded to ntdll.dll and kernelbase.dll.

Sometimes you can append "Stub" to the function name when setting a breakpoint and sometimes you just have to know that the function is actually implemented in a lower-level .dll and set the breakpoint on the function in that .dll. You can also find it with tab-completion and a name like *!functionname*.

Upvotes: 0

Steve Johnson
Steve Johnson

Reputation: 3027

Set your breakpoint in kernelbase.dll instead.

Upvotes: 2

Related Questions