// Token: 0x06000116 RID: 278 RVA: 0x00005214 File Offset: 0x00003414
 private void OnTargetHitBreakpoint(object sender, TargetEventArgs args)
 {
     try
     {
         Thread             threadFromTargetArgs = this.threading.GetThreadFromTargetArgs("OnTargetHitBreakpoint()", args);
         Breakpoint         breakpoint           = args.BreakEvent as Breakpoint;
         PendingBreakpoint  pending;
         AD7BoundBreakpoint bound;
         if (this.TryGetPendingBreakpoint(breakpoint, out pending) && BreakpointsAdapter.TryGetBoundBreakpoint(breakpoint, pending, out bound))
         {
             this.eventSender.SendEvent(new BreakpointEvent(threadFromTargetArgs, bound));
         }
         else if (!breakpoint.NonUserBreakpoint)
         {
             Utils.Message("OnTargetHitBreakpoint(): Unknown breakpoint!", new object[0]);
             this.eventSender.SendEvent(new StepCompleteEvent(threadFromTargetArgs));
         }
     }
     catch (Exception ex)
     {
         Utils.Message("OnTargetHitBreakpoint Exception: {0}", new object[]
         {
             ex
         });
     }
 }
Esempio n. 2
0
 // Token: 0x06000167 RID: 359 RVA: 0x00005BDC File Offset: 0x00003DDC
 internal Process(Port port, Engine engine, IEventSender eventSender, SoftDebuggerSession session, StartInfo startInfo, string name)
 {
     this.guid                    = Guid.NewGuid();
     this.Port                    = port;
     this.Engine                  = engine;
     this.Session                 = session;
     this.name                    = name;
     this.startInfo               = startInfo;
     this.eventSender             = eventSender;
     session.TargetReady         += this.OnTargetReady;
     session.TargetExited        += new EventHandler <TargetEventArgs>(this.OnTargetExited);
     session.TargetInterrupted   += new EventHandler <TargetEventArgs>(this.OnTargetExited);
     session.TargetStopped       += this.OnTargetPaused;
     session.TargetThreadStarted += this.OnThreadStart;
     session.TargetThreadStopped += this.OnThreadDeath;
     this.exceptions              = new ExceptionsAdapter(this, eventSender, session);
     this.typeResolver            = new TypeResolverAdapter(session);
     this.Breakpoints             = new BreakpointsAdapter(this, eventSender, session);
 }
        // Token: 0x06000117 RID: 279 RVA: 0x000052C0 File Offset: 0x000034C0
        private void OnBreakpointStatusChanged(object sender, BreakpointEventArgs args)
        {
            Breakpoint        breakpoint = args.Breakpoint;
            PendingBreakpoint pendingBreakpoint;

            if (this.TryGetPendingBreakpoint(args.Breakpoint, out pendingBreakpoint))
            {
                BreakEventStatus   status = args.Breakpoint.GetStatus(this.session);
                AD7BoundBreakpoint bound;
                if (status == BreakEventStatus.Bound)
                {
                    if (!BreakpointsAdapter.TryGetBoundBreakpoint(breakpoint, pendingBreakpoint, out bound))
                    {
                        bound = new AD7BoundBreakpoint(pendingBreakpoint, args.Breakpoint, this.process);
                        pendingBreakpoint.OnBreakpointBound(bound);
                        return;
                    }
                }
                else if (BreakpointsAdapter.TryGetBoundBreakpoint(breakpoint, pendingBreakpoint, out bound))
                {
                    pendingBreakpoint.OnBreakpointUnbound(bound);
                }
            }
        }