コード例 #1
0
ファイル: Program.cs プロジェクト: slluis/DumpSymbolicate
        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);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: slluis/DumpSymbolicate
        public void Enrich(MonoStateUnmanagedFrame frame)
        {
            if (frame.address == "outside mono-sgen")
            {
                return;
            }
            else
            {
                Console.WriteLine("Symbolicating!");
            }

            Console.WriteLine("Process started, sending {0}", frame.address);

            if (llvm_process == null)
            {
                InitLLvmSymbolizer();
            }

            llvm_process.StandardInput.WriteLine(frame.address);
            llvm_process.StandardInput.WriteLine();

            Console.WriteLine("Reading...");

            string output = llvm_process.StandardOutput.ReadLine();

            frame.name = output;

            Console.WriteLine("{0} Before Wait -> Exited", output);

            // Read the blank line
            llvm_process.StandardOutput.ReadLine();
        }