Leaving

After 6 great years at Microsoft, my wife and I have decided it’s time to spend some time living near our family in Ontario, Canada (we’ve got two young kids, and they’re going to love seeing their grandparents and cousins more than twice a year).  I’ve been having a great time on the CLR (working…

3

Sample Reflection.Emit code for using exception filters from C#

In this post, I mentioned that one way to use exception filters from C# code is to generate them with Reflection.Emit.  Personally I usually prefer static compilation (even post-build assembly merging or rewriting) – there’s really nothing here that necessitates dynamic code generation, but I can understand the desire to avoid complicating the build process. …

0

Quickly seeing where an exception may land in the debugger

A co-worker asked me recently how he could predict where an exception that was about to be thrown would land while debugging a managed application.  The real answer to this question is “you can’t – step into the throw and see”.  The EH system in the CLR has lots of complicated algorithms for determining this,…

0

My school assignment required parsing PDB files

I’m just finishing up my Masters in Computer Science, and was surprised when I recently got an assignment that involved parsing PDB files.  Over the years I’ve been involved in many discussions about why the Microsoft PDB format isn’t public.  John Robbins recently went as far as to say “The actual file format of a…

3

New interviews with my CLR team members up on Channel9

There are a bunch of great new CLR v4-related video interviews up on Channel9.  In particular: Jon, Thomas and Dave from my team (CLR diagnostics) discuss the advancements in debugging and profiling APIs in v4 Simon and I discuss in-process SxS (ability to have multiple CLRs loaded in the same process).  You may have noticed the…

0

AnyCPU Exes are usually more trouble than they’re worth

Over the past few months I’ve had some interesting debates with folks here (and some customers) about the cost/benefit trade-off of “AnyCPU” (architecture-neutral) managed EXEs.  I think we’ve converged on a consensus that most of the time they’re not what you want and so shouldn’t be the default in Visual Studio.  I suspect this topic may…

18

CCI is public on Codeplex

Herman Venter has just released his Common Compiler Infrastructure as an OpenSource project on Codeplex.  CCI is a GREAT set of libraries for building, analyzing, and modifying .NET assemblies and PDB files – written entirely in C#.  Several Microsoft projects have been using it internally for years.  Most notably, it’s the engine behind FxCop.  If…

1

Getting good dumps when an exception is thrown

Often, when an unexpected exception occurs in production code, applications want to generate (and potentially report) some sort of diagnostics information.  Sometimes people just want to write to a log file (and perhaps pop some error dialog) for support purposes, but more sophisticated applications will want to have a mechanism to save a minidump of…

5

CLR 4.0 advancements in diagnostics

We announced at PDC today that we’re making some significant advances in diagnostics tool support for CLR v4!  In particular, we’ve been investing heavily in improving our support for production diagnostics scenarios over the past couple years.  I’m excited that we’re finally able to start talking about it! Here’s a quick list of some of the…

16

ICorDebug re-architecture in CLR 4.0

In my previous post I mentioned that CLR 4.0 will support managed dump debugging through ICorDebug, and that to do this we had to re-architect the debugging support in the CLR.  I want to give you a little more detail about what we’ve been doing here.  I’m sure I (and others) will be discussing more…

6