First set of licensing changes
[mono.git] / mono / utils / mono-stack-unwinding.h
index 21331fa1bd83e7069e7923ddba41348be6e984b6..123f40ba2ada9142574079d10a086586925900e6 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright 2008-2010 Novell, Inc.
  * Copyright 2011 Xamarin Inc.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 #ifndef __MONO_MONO_STACK_UNWINDING_H__
 #define __MONO_MONO_STACK_UNWINDING_H__
@@ -19,7 +20,8 @@ typedef enum {
        FRAME_TYPE_DEBUGGER_INVOKE = 1,
        /* Frame for transitioning to native code */
        FRAME_TYPE_MANAGED_TO_NATIVE = 2,
-       FRAME_TYPE_SENTINEL = 3
+       FRAME_TYPE_TRAMPOLINE = 3,
+       FRAME_TYPE_NUM = 4
 } MonoStackFrameType;
 
 typedef enum {
@@ -46,16 +48,23 @@ typedef struct {
        MonoJitInfo *ji;
        /*
         * Same as ji->method.
+        * Not valid if ASYNC_CONTEXT is true.
         */
        MonoMethod *method;
        /*
         * If ji->method is a gshared method, this is the actual method instance.
         * This is only filled if lookup for actual method was requested (MONO_UNWIND_LOOKUP_ACTUAL_METHOD)
+        * Not valid if ASYNC_CONTEXT is true.
         */
        MonoMethod *actual_method;
        /* The domain containing the code executed by this frame */
        MonoDomain *domain;
+       /* Whenever method is a user level method */
        gboolean managed;
+       /*
+        * Whenever this frame was loaded in async context.
+        */
+       gboolean async_context;
        int native_offset;
        /*
         * IL offset of this frame.
@@ -64,7 +73,7 @@ typedef struct {
         */
        int il_offset;
 
-       /*The next fields are only usefull for the jit*/
+       /* The next fields are only useful for the jit */
        gpointer lmf;
        guint32 unwind_info_len;
        guint8 *unwind_info;
@@ -87,6 +96,8 @@ typedef struct {
        MonoContext ctx;
        gpointer unwind_data [3]; /*right now: domain, lmf and jit_tls*/
        gboolean valid;
+       void *gc_stackdata;
+       int gc_stackdata_size;
 } MonoThreadUnwindState;