|
| WinDbg - Extension for Managed Code Analysis |
 |
Fri, 21 Mar 2008 12:48:00 -070 |
Hello everyone,
Out of inspiration from Steve (http://www.stevestechspot.com/
SOSEXANewDebuggingExtensionForManagedCode.aspx), I would like to try
my hand at writing a WinDbg extension--probably using EngExtCpp. I
have a few ideas about commands that would make life easier in our
production debugging scenarios at work.
Anyhow, I can find samples online of using EngExtCpp for interesting
purposes (http://www.codeproject.com/KB/debug/cdbntsd4.aspx), but
there seems to be a real lack of information about how to deal with
managed objects from these extensions. For instance, I can look at
the ECMA-335 documentation and see more than I ever wanted to know
about how to understand metadata in a .NET assembly--I even found a
version with Microsoft-specific implementation notes. But, surely
there is an API set for accessing the metadata from a WinDbg
extension. Am I really going to have to "start from scratch" and
build all my own structs and APIs for dealing w/ this stuff? Surely
the .NET team has something useful out there that SOS is using under
the hood!
So, my questions is, what help (if any) do I get for dealing with
managed objects, assemblies, method descriptions, etc. from a WinDbg
extension?
|
| Post Reply
|
| Re: WinDbg - Extension for Managed Code Analysis |
 |
Fri, 21 Mar 2008 17:59:36 -070 |
On Mar 21, 2:48 pm, Jethro <Jeff.D.R...@gmail.com> wrote:
> Hello everyone,
>
> Out of inspiration from Steve (http://www.stevestechspot.com/
> SOSEXANewDebuggingExtensionForManagedCode.aspx), I would like to try
> my hand at writing a WinDbg extension--probably using EngExtCpp. I
> have a few ideas about commands that would make life easier in our
> production debugging scenarios at work.
>
> Anyhow, I can find samples online of using EngExtCpp for interesting
> purposes (http://www.codeproject.com/KB/debug/cdbntsd4.aspx), but
> there seems to be a real lack of information about how to deal with
> managed objects from these extensions. For instance, I can look at
> the ECMA-335 documentation and see more than I ever wanted to know
> about how to understand metadata in a .NET assembly--I even found a
> version with Microsoft-specific implementation notes. But, surely
> there is an API set for accessing the metadata from a WinDbg
> extension. Am I really going to have to "start from scratch"
and
> build all my own structs and APIs for dealing w/ this stuff? Surely
> the .NET team has something useful out there that SOS is using under
> the hood!
>
> So, my questions is, what help (if any) do I get for dealing with
> managed objects, assemblies, method descriptions, etc. from a WinDbg
> extension?
>
> Gracias!
This link looks pretty promising:
http://msdn2.microsoft.com/en-us/library/ms404430.aspx
I may have answered my own question. Feel free to comment if you have
|
| Post Reply
|
|
|
|
|
|
|
|
|
|