protected override unsafe int OnFunctionRemapComplete(
     CorDebugAppDomain pAppDomain,
     CorDebugThread pThread,
     CorDebugFunction pFunction)
 {
     FunctionRemapComplete?.Invoke(this, pAppDomain, pThread, pFunction);
     return(Continue());
 }
 protected override unsafe int OnEditAndContinueRemap(
     CorDebugAppDomain pAppDomain,
     CorDebugThread pThread,
     CorDebugFunction pFunction,
     bool fAccurate)
 {
     EditAndContinueRemap?.Invoke(this, pAppDomain, pThread, pFunction, fAccurate);
     return(Continue());
 }
        protected override unsafe int OnFunctionRemapOpportunity(
            CorDebugAppDomain pAppDomain,
            CorDebugThread pThread,
            CorDebugFunction pOldFunction,
            CorDebugFunction pNewFunction,
            uint oldILOffset)
        {
            FunctionRemapOpportunity?.Invoke(
                this,
                pAppDomain,
                pThread,
                pOldFunction,
                pNewFunction,
                oldILOffset);

            return(Continue());
        }
Exemple #4
0
 protected abstract int OnFunctionRemapOpportunity(
     CorDebugAppDomain pAppDomain,
     CorDebugThread pThread,
     CorDebugFunction pOldFunction,
     CorDebugFunction pNewFunction,
     uint oldILOffset);
Exemple #5
0
 protected abstract int OnEditAndContinueRemap(
     CorDebugAppDomain pAppDomain,
     CorDebugThread pThread,
     CorDebugFunction pFunction,
     bool fAccurate);
Exemple #6
0
 protected abstract int OnFunctionRemapComplete(
     CorDebugAppDomain pAppDomain,
     CorDebugThread pThread,
     CorDebugFunction pFunction);
Exemple #7
0
 public CorDebugValue RuntimeInvoke(CorEvaluationContext corEvaluationContext, CorDebugFunction function, CorDebugType[] typeArgs, CorDebugValue thisObj, CorDebugValue[] arguments)
 {
     return(null);
 }
Exemple #8
0
 int ICorDebugManagedCallback.EditAndContinueRemap(CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugFunction pFunction, int fAccurate)
 {
     return(0);
 }
Exemple #9
0
        protected override BreakEventInfo OnInsertBreakEvent(BreakEvent breakEvent)
        {
            var binfo = new BreakEventInfo();

            var bp = breakEvent as Breakpoint;

            if (bp != null)
            {
                if (bp is FunctionBreakpoint)
                {
                    // FIXME: implement breaking on function name
                    binfo.SetStatus(BreakEventStatus.Invalid, null);
                    return(binfo);
                }
                else
                {
                    DocInfo doc;
                    if (!documents.TryGetValue(System.IO.Path.GetFullPath(bp.FileName), out doc))
                    {
                        binfo.SetStatus(BreakEventStatus.NotBound, "Cannot find source file in pdb/mdb debugging database.");
                        return(binfo);
                    }

                    MethodSymbols met = doc.GetClosestMethod(bp.Line);

                    int offset = -1;
                    foreach (var sp in met.Instructions)
                    {
                        if (sp.SequencePoint.StartLine == bp.Line)
                        {
                            offset = sp.Offset;
                            break;
                        }
                    }
                    if (offset == -1)
                    {
                        if (bp.Line < met.Instructions.First().SequencePoint.StartLine)
                        {
                            offset = met.Instructions.First().Offset;
                        }
                        else
                        {
                            offset = met.Instructions.Last().Offset;
                        }
                    }

                    CorDebugFunction           func  = doc.Assembly.GetFunctionFromTokenCLR(met.MethodToken.ToUInt32());
                    CorDebugFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint((uint)offset);
                    corBp.Active = bp.Enabled;

                    binfo.Handle = corBp;
                    binfo.SetStatus(BreakEventStatus.Bound, null);
                    return(binfo);
                }
            }

//			var cp = breakEvent as Catchpoint;
//			if (cp != null) {
//				foreach (ModuleInfo mod in modules.Values) {
//					CorMetadataImport mi = mod.Importer;
//					if (mi != null) {
//						foreach (Type t in mi.DefinedTypes)
//							if (t.FullName == cp.ExceptionName) {
//								binfo.SetStatus (BreakEventStatus.Bound, null);
//								return binfo;
//							}
//					}
//				}
//			}

            binfo.SetStatus(BreakEventStatus.Invalid, null);
            return(binfo);
        }
 public CorDebugValue RuntimeInvoke(CorDebugFunction function, CorDebugType[] typeArgs, CorDebugValue thisObj, CorDebugValue[] arguments)
 {
     return(Session.RuntimeInvoke(this, function, typeArgs, thisObj, arguments));
 }