Esempio n. 1
0
        public O2MDbgThread(MDbgThread mdbgThread) : this()
        {
            MdbgThread = mdbgThread;            
            Id = mdbgThread.Id;
            Number = mdbgThread.Number;
            HaveCurrentFrame = mdbgThread.HaveCurrentFrame;            
            currentLocation = new O2MDbgCurrentLocation(mdbgThread.CurrentSourcePosition);
            if (mdbgThread.CurrentException != null && mdbgThread.CurrentException.IsNull == false)
            {
                currentException = mdbgThread.CurrentException.GetStringValue(false);
                currentException_expandedView = mdbgThread.CurrentException.GetStringValue(true);
            }
            calculateStackTrace();

            o2MDbgvariables = DI.o2MDbg.sessionData.getCurrentFrameVariables(0 /*expandDepth*/, false /*canDoFunceval*/);
        }
Esempio n. 2
0
 internal void raiseOnBreakEvent(O2MDbgCurrentLocation o2MDbgCurrentLocation)
 {
     if (registeredOnBreakEventCallbacks == null)
         registeredOnBreakEventCallbacks = new Dictionary<string, List<Func<O2MDbgCurrentLocation, Dictionary<string, O2MDbgVariable>, bool>>>();
     Callbacks.raiseRegistedCallbacks(onBreakEvent);
     // make sure all breakpoints are registed
     var activeBreakPoints = BreakPoints.getBreakPointsAsStringList();
     foreach (var breakpointSignature in registeredOnBreakEventCallbacks.Keys)
         if (false == activeBreakPoints.Contains(breakpointSignature))
             BreakPoints.addBreakPoint(breakpointSignature);
     // check if we need to invoke a callback
     //if (o2MDbgCurrentLocation.hasSourceCodeDetails)
     //{
     var currentLocationString = o2MDbgCurrentLocation.ToString();
     if (registeredOnBreakEventCallbacks.ContainsKey(currentLocationString))
     {
         Dictionary<string, O2MDbgVariable> variablesDictionary = DI.o2MDbg.sessionData.getVariablesDictionary();
         foreach (var callback in registeredOnBreakEventCallbacks[currentLocationString])
             if (callback(o2MDbgCurrentLocation, variablesDictionary))
             {
                 // means execution is supposed to continue
                 O2MDbgUtils.continueAttachedProjet();
                 return;
             }
     }
     if (DI.o2MDbg.AutoContinueOnBreakPointEvent)
         O2MDbgUtils.continueAttachedProjet();
 }