Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Interop (mixed-mode)   (RSS)

Breaking changes in ICorDebug from 1.1 to 2.0.

Here are some random notes about specific ICorDebug breaking changes between .NET v1.1 (Everett) and .NET 2.0 (Whidbey). (I came across these as I was cleaning out old documents in preparation for my upcoming move). This would have been more timely 2

Things that what work in Native-debugging that don't work in Interop-debugging.

Interop-debugging (mixed-mode) is managed + native debugging combined. Well, sort of. Native and managed debugging have very different paradigms. Native debugging tends to own the whole process, while managed debugging tends to require control of the

How to tell if a function is managed code?

This is a moot point for pure C# apps, but what if you're writing in MC++ (or some other 'mixed' language) and you want to know if a function is getting compiled as managed or native code? You can try and inspect the source and infer from the language

Interop-debugging fails when using more than 63 TLS slots

Here's a Public Service Announcement: Interop-debugging may hang if the debuggee uses more than 63 native Thread Local-Storage slots and then loads the CLR. KB939969 has more details, including three workarounds. This is fixed in Orcas, so only applies

Tips for writing an Interop Debugger

I've had a growing number of people inquire about how to write an interop-debugger with ICorDebug. I strongly advise anybody considering writing an interop-debugger to reconsider for reasons listed here . However, for those who can not be dissuaded, and
Posted by jmstall | 4 Comments

You don't want to write an interop debugger.

I've had a growing number of people inquire about how to write an interop-debugger with ICorDebug. My goal here is to discourage you from doing that. (This reminds me of one of my college classes. On day one, the acting-Prof launched into a great sermon

Beware of the Vectored Exception Handler and managed code

A vectored exception handler (see kernel32!AddVectoredExceptionHandler ) lets you add to a global list of filters that get executed by the OS when a native exception is thrown. More specifically, this list is executed by the OS before the filters in the

Why can't you detach in interop-debugging?

Matt Pietrek noticed you can't detach while interop-debugging (aka " mixed-mode ") in VS. Short answer: this is a limitation of the CLR / ICorDebug. Longer answer follows... Some history : Interop-debugging is managed + native debugging simultaneously
Posted by jmstall | 8 Comments

You can't do Edit-and-Continue with Interop-debugging on.

Somebody asked on the forums about Edit-and-Continue (EnC) in mixed mode . You can't use managed EnC with mixed-mode ( interop ) debugging enabled. This is a limitation of the CLR Debugging Services. Both Interop-debugging and EnC are complicated features;

F5 vs. Ctrl-F5

In VS, F5 will launch your application under the debugger. Under the debugger, you'll hit breakpoints, be able to edit-and-continue, and do all the debugger things you know and love. Ctrl+F5 will launch your application outside of the debugger. This is

Out-of-band events and Mixed-mode debugging

Interop-debugging splits all debug events into "In-band (IB) " and "Out-of-band (OOB)". Inband events are the good ones: at an inband event, the debuggee is stopped and you can use the rest of the ICorDebug API normally to do inspection and other things
Posted by jmstall | 2 Comments

How can I tell if I'm interop-debugging?

Sometimes I'm debugging and I want to make sure that I'm actually interop-debugging and not accidentally managed-only debugging. (Now that interop-debugging is so much faster and more stable in whidbey, it's easy to forget you're doing it). One way is
Posted by jmstall | 2 Comments

Auto-attach to child process is not supported in managed-debugging

Native-only debugging allows you to debug child processes. In other words, you can debug process A, and then if A spawns process B, your debugger can automatically start debugging process B. This eliminates the need to manually attach to process B, and
Posted by jmstall | 1 Comments

You can't get a mixed-mode callstack from inprocess.

You can't get a full-mixed (both managed+ native) stack of a thread within your own process. You can get a native-only stack from function like DbgHelp!StackWalk64 (which is what this article on Codeproject does) to get the native callstack of a native
Posted by jmstall | 7 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
More Posts Next page »
 
Page view tracker