about windbg's 'bm' command, anyone can help me?

When I want to set breakpoints on all exports of WinINet.dll, windbg responsed me as this:
|
|0:000> bm wininet!*
|No matching code symbols found, no breakpoints set.
|If you are using public symbols, switch to full or export symbols.
|

When I apply ‘bm’ command to other dlls, it works well.
But I can list all exports of wininet.dll:
|
|0:000> x wininet!*
|…
|766ec883 WININET!GetPkgMaxToken =
|7670a9f8 WININET!SocketsFunctions =
|7668d86d WININET!InternetIndicateStatus =
|…
|

And I can set breakpoint at the exports one by one with ‘bp’ command:
|
|0:000> bp WININET!HttpEndRequestW
|0:000> bl
| 0 e 766e19a5 0001 (0001) 0:*** WININET!HttpEndRequestW
|

My question is how to “switch to full or export symbols”?
or, how can I make “bm wininet!*” work?

TIA.

???TangGeng
???xxxxx@vip.sina.com
???2004-10-26

When I want to set breakpoints on all exports of WinINet.dll, windbg responsed me as this:
|
|0:000> bm wininet!*
|No matching code symbols found, no breakpoints set.
|If you are using public symbols, switch to full or export symbols.
|

When I apply ‘bm’ command to other dlls, it works well.
But I can list all exports of wininet.dll:
|
|0:000> x wininet!*
|…
|766ec883 WININET!GetPkgMaxToken =
|7670a9f8 WININET!SocketsFunctions =
|7668d86d WININET!InternetIndicateStatus =
|…
|

And I can set breakpoint at the exports one by one with ‘bp’ command:
|
|0:000> bp WININET!HttpEndRequestW
|0:000> bl
| 0 e 766e19a5 0001 (0001) 0:*** WININET!HttpEndRequestW
|

My question is how to “switch to full or export symbols”?
or, how can I make “bm wininet!*” work?

TIA.

TangGeng
xxxxx@vip.sina.com
2004-11-4

The reason bm does not work with public symbols is because there is not
enough type information to tell the difference between the functions and
the data. So if WinDbg started putting breakpoints on data, you risk
corruption. This is one of the few cases where you can actually do more
with ‘export’ symbols than with ‘public’ symbols, and ‘full’ symbols are
likely not available to you for components you do not own. You can use
‘/a’ to override this (documentation for bm mentions this).

So the way to work around this safely is to temporarily have WinDbg only
use the export symbols (which are available in the executable image
itself). The reason this works is because export symbols ONLY contain
exported functions, so you know there will be no data corruption. To do
this:
1 - Do ‘.sympath’, just so you know what it is
2 - Do ‘.sympath c:\doesnt_exist’
3 - You may need to do repeat steps 1 and 2 with .exepath
4 - Do ‘.reload /f wininet.dll’
5 - Do ‘lmlmwininet’, and notice it says ‘export symbols’
6 - Do your ‘bm’ command
7 - reset your .sympath and .exepath back to what it originally was
8 - Do ‘.reload /f wininet.dll’, to get your public symbols back, so you
can get accurate stack traces again.

Jason


Subject: about windbg’s ‘bm’ command, anyone can help me?
From: “TangGeng”
Date: Thu, 4 Nov 2004 10:41:04 +0800
X-Message-Number: 15

When I want to set breakpoints on all exports of WinINet.dll, windbg
responsed me as this:
|
|0:000> bm wininet!
|No matching code symbols found, no breakpoints set.
|If you are using public symbols, switch to full or export symbols.
|

When I apply ‘bm’ command to other dlls, it works well.
But I can list all exports of wininet.dll:
|
|0:000> x wininet!

|…
|766ec883 WININET!GetPkgMaxToken =
|7670a9f8 WININET!SocketsFunctions =
|7668d86d WININET!InternetIndicateStatus =
|…
|

And I can set breakpoint at the exports one by one with ‘bp’ command:
|
|0:000> bp WININET!HttpEndRequestW
|0:000> bl
| 0 e 766e19a5 0001 (0001) 0:*** WININET!HttpEndRequestW
|

My question is how to “switch to full or export symbols”?
or, how can I make “bm wininet!*” work?

TIA.

TangGeng
xxxxx@vip.sina.com
2004-11-4