Exemplo n.º 1
0
        ParseFrames(JArray frames)
        {
            if (frames == null)
            {
                return(Array.Empty <MonoStateFrame> ());
            }

            var output = new MonoStateFrame[frames.Count];

            for (int i = 0; i < frames.Count; i++)
            {
                var frame = ((JObject)frames[i]);
                //Console.WriteLine (frame.ToString ());

                if (!frame.ContainsKey("is_managed") || (string)(frame["is_managed"]) != "true")
                {
                    var added = new MonoStateUnmanagedFrame();
                    added.address = (string)frame["native_address"];
                    Console.WriteLine("Native address: {0}", added.address);
                    output [i] = added;
                }
                else
                {
                    var added = new MonoStateManagedFrame();
                    added.mvid   = (string)frame ["guid"];
                    added.token  = Convert.ToUInt32((string)frame ["token"], 16);
                    added.offset = Convert.ToUInt32((string)frame ["il_offset"], 16);
                    output[i]    = added;
                }
            }
            return(output);
        }
Exemplo n.º 2
0
 public void ProcessOne(CodeCollection code, MonoStateFrame frame)
 {
     if (frame is MonoStateManagedFrame)
     {
         code.Enrich(frame as MonoStateManagedFrame);
     }
     else if (frame is MonoStateUnmanagedFrame)
     {
         code.Enrich(frame as MonoStateUnmanagedFrame);
     }
 }
Exemplo n.º 3
0
 public static string FormatFrame(MonoStateFrame frame)
 {
     //Console.WriteLine ("Frame: {0}", frame.);
     return("");
 }