BUG: Incomplete call stack when you debug mixed managed and unmanaged Visual C++ code (317221)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ 2005 Express Edition
This article was previously published under Q317221 SYMPTOMS
When you mix managed and unmanaged Visual C++ code, the Microsoft Visual Studio integrated development environment (IDE) reports incomplete call stack information.
In certain cases, the mixed managed and unmanaged stack trace may miss a stack frame of unmanaged code that is above a stack frame of managed code. In other situations, only the managed stack trace is displayed, even if there is unmanaged code above the managed code.
This may cause a problem when you debug Visual C++ applications that contain both managed and unmanaged Visual C++ code. If you step out of a managed function, the debugger may continue to run.
CAUSE
When you call unmanaged code from managed code, the .NET runtime generates stubs and calls through the stubs. During the call, .NET pushes a transition frame object onto the thread stack.
The Visual Studio debugger cannot display the complete stack trace for any frames that do not contain enough information for the debugger to proceed up the call chain.
There are many types of transitions from managed into unmanaged code; most mixed stack traces display the correct call stack information.
STATUSThis behavior is by design.
Modification Type: | Minor | Last Reviewed: | 1/12/2006 |
---|
Keywords: | kbBug kbDebug kbide kbIJW kbManaged kbprb KB317221 kbAudDeveloper |
---|
|