[Mono-devel-list] Is native codes for C# methods and CLI internal calls different?

Paolo Molaro lupus at ximian.com
Tue Mar 1 13:05:26 EST 2005


On 02/28/05 Vivek, Bharath Varma (IE10) wrote:
> I make a call to mono_jit_walk_stack from an unhandled exception filter that
> is called on an x86 breakpoint exception within Console.WriteLine JITed
> code. I determine current_ip & current_bp from the exception context
> information that is available to me in the exception filter. I do the
> following within mono_jit_walk_stack
> 
> MONO_CONTEXT_SET_IP (&ctx,current_ip);
> MONO_CONTEXT_SET_BP(&ctx,current_bp);
> 
> The stack walk within mono_jit_walk_stack tells me there are 3 methods 
> WriteLine, Main, runtime_invoke_void.
> 
> I was thinking that the stack walk would give me the entire call stack
> starting from Console.WriteLine and going up all the way through the various
> class library corlib methods and eventually ending up in Main of my
> HelloWorld. I basically expected to see a huge stack walk.
> 
> Any idea why my stack walk shows me only 3 methods?

If you have the filter in Console.WriteLine() and you call it from Main, why
do you expect a huge stack walk? It looks correct that it just shows
WriteLine, Main and the invoke wrapper used to go from unmanaged
to managed code.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list