Exemple #1
0
				public DebugStackFrameMarker(TextMarkerService svc, DebugEngineWrapper.StackFrame frm, int text_offset)
					: base(svc, text_offset, true)
				{
					Frame = frm;

					if (frm.FrameNumber < 1)
						BackgroundColor = Colors.Yellow;
					else
						BackgroundColor = Colors.Green;
					MarkerType = TextMarkerType.None;
				}
Exemple #2
0
                public DebugStackFrameMarker(TextMarkerService svc, DebugEngineWrapper.StackFrame frm, int text_offset)
                    : base(svc, text_offset, true)
                {
                    Frame = frm;

                    if (frm.FrameNumber < 1)
                    {
                        BackgroundColor = Colors.Yellow;
                    }
                    else
                    {
                        BackgroundColor = Colors.Green;
                    }
                    MarkerType = TextMarkerType.None;
                }
Exemple #3
0
                public static DebugStackFrameMarker Create(TextMarkerService svc, DebugEngineWrapper.StackFrame frm)
                {
                    string fn;
                    uint   ln;
                    ulong  off = frm.InstructionOffset;

                    if (Engine.Symbols.GetLineByOffset(off, out fn, out ln))
                    {
                        var text_off = svc.Editor.Document.GetOffset((int)ln, 0);

                        var m = new DebugStackFrameMarker(svc, frm, text_off);
                        m.Redraw();

                        return(m);
                    }
                    return(null);
                }
Exemple #4
0
        StackFrame CreateFrame(DEW.StackFrame frameData)
        {
            string fn;
            uint   ln;
            ulong  off = frameData.InstructionOffset;

            Engine.Symbols.GetLineByOffset(off, out fn, out ln);

            /*
             * SourceLocation loc = new SourceLocation (func ?? "?", sfile, line);
             *
             * long addr;
             * if (!string.IsNullOrEmpty (sadr))
             *      addr = long.Parse (sadr.Substring (2), NumberStyles.HexNumber);
             * else
             *      addr = 0;
             */

            string         methodName = Engine.Symbols.GetNameByOffset(off);
            SourceLocation loc        = new SourceLocation(methodName, fn, (int)ln);

            return(new StackFrame((long)off, loc, "Native"));

            /*
             * string lang = "Native";
             * string func = frameData.GetValue ("func");
             * string sadr = frameData.GetValue ("addr");
             *
             * if (func == "??" && session.IsMonoProcess) {
             *      // Try to get the managed func name
             *      try {
             *              ResultData data = session.RunCommand ("-data-evaluate-expression", "mono_pmip(" + sadr + ")");
             *              string val = data.GetValue ("value");
             *              if (val != null) {
             *                      int i = val.IndexOf ('"');
             *                      if (i != -1) {
             *                              func = val.Substring (i).Trim ('"',' ');
             *                              lang = "Mono";
             *                      }
             *              }
             *      } catch {
             *      }
             * }
             *
             * int line = -1;
             * string sline = frameData.GetValue ("line");
             * if (sline != null)
             *      line = int.Parse (sline);
             *
             * string sfile = frameData.GetValue ("fullname");
             * if (sfile == null)
             *      sfile = frameData.GetValue ("file");
             * if (sfile == null)
             *      sfile = frameData.GetValue ("from");
             * SourceLocation loc = new SourceLocation (func ?? "?", sfile, line);
             *
             * long addr;
             * if (!string.IsNullOrEmpty (sadr))
             *      addr = long.Parse (sadr.Substring (2), NumberStyles.HexNumber);
             * else
             *      addr = 0;
             *
             * return new StackFrame (addr, loc, lang);
             */
        }