Welcome to MSDN Blogs Sign in | Join | Help

July 2005 - Posts

Correction: you can't reasonably instantiate your own ICorDebug

There’s a significant problem for 3rd-party hobbyists trying to implement their own ICorDebug: how do you get a debugger (like VS) to instantiate your private version? I briefly talked about that here but realize that my advice there was misleading. ICorDebug
Posted by jmstall | 0 Comments
Filed under:

Simple harness to print exceptions in an app

Several people have asked how to write something that runs some executable under a harness and then dumps all the exceptions that are thrown. Back in November, I wrote a similar harness to dump load module events using MDbg . You can easily modify that
Posted by jmstall | 9 Comments
Filed under: ,

Using ICorDebugProcess::HasQueuedCallbacks

The native debugging APIs (like kernel32!WaitForDebugEvent ), dispatch one debug event at a time. In contrast, ICorDebug queues up debug events and such may be ready to dispatch multiple events at a single stop. This is an extremely significant difference.
Posted by jmstall | 5 Comments
Filed under:

Debug support for arbitrary state-machines

I mentioned here that if your language compiles to IL, then you get free debugging support with Visual Studio (and other managed debuggers). But what if you have an interpreter that can’t compile to IL? For example, suppose you load some state machine
Posted by jmstall | 7 Comments

Source-level step-in is not well defined.

One of the things that causes us grief is that source-level step-in (F11 in VS) is not a well-defined operation. Some examples : Consider the following call to static method foo: MyClass.foo(...); Now offhand, you'd expect the step-in to land in the method
Posted by jmstall | 3 Comments
Filed under: ,

My wish: CLR as gaming scripting engine for Civilization

I'm a big fan of Sid Meier's Civilization series. One thing I would love to see is for them to use the CLR as back-end scripting engine. Alpha Centauri (SMAC) had some good automation, but you could really work some wonders if you had a full scripting
Posted by jmstall | 4 Comments
Filed under:

Problem with .maxstack in IL-roundtripping tools

I previously posted a tool to allow inline IL in C# / VB.Net. At the IL level, the CLR needs to know the maximum stack depth of each method. This can be specified in ILasm via the “.maxstack” directive. In that post I wrongfully said that if you leave
Posted by jmstall | 3 Comments

A common problem: forgetting to call ICorDebugAppDomain::Attach

I notice one of the most common issues folks hit when they try to write their own managed debugger is forgetting to call ICorDebugAppomain::Attach() at the right time. I've seen this 3 different times recently. This part of ICorDebug is not documented
Posted by jmstall | 2 Comments

64-bit CLR doesn't support Interop debugging

Just FYI, we don't support interop-debugging on 64-bit CLR (or on win9x). You can still do 32-bit interop-debugging within the WOW on 64-bit. (You also can't do managed-debugging locally across the WOW boundary. You can set up a remote debugging channel
Posted by jmstall | 3 Comments

It's been a while

I notice it's been a while since I blogged last. I'm still here - we've just been really focused on shipping Whidbey and had some important deadlines. There are a few entries I'm in the middle of writing that I hope people will find valuable, particularly
Posted by jmstall | 5 Comments
Filed under:
 
Page view tracker