Passing ICorDebugProcess instead of ICorDebugController
authorAndrew Au <andrewau@microsoft.com>
Thu, 10 May 2018 23:43:54 +0000 (16:43 -0700)
committerAndrew Au <cshung@gmail.com>
Wed, 7 Nov 2018 02:34:47 +0000 (18:34 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/8b9a73155033098133df0605d6e3352cd672b3ef

src/coreclr/src/debug/di/process.cpp
src/coreclr/src/debug/di/rsmain.cpp
src/coreclr/src/debug/di/shimcallback.cpp
src/coreclr/src/debug/di/shimpriv.h
src/coreclr/src/debug/ee/debugger.cpp
src/coreclr/src/inc/cordebug.idl
src/coreclr/src/pal/prebuilt/inc/cordebug.h

index 18e0ac7..fd3e3c9 100644 (file)
@@ -5021,7 +5021,7 @@ void CordbProcess::RawDispatchEvent(
         {
             {
                 PUBLIC_CALLBACK_IN_THIS_SCOPE(this, pLockHolder, pEvent);
-                pCallback4->BeforeGarbageCollection(static_cast<ICorDebugController*>(this));
+                pCallback4->BeforeGarbageCollection(static_cast<ICorDebugProcess*>(this));
             }
             break;
         }
@@ -5030,7 +5030,7 @@ void CordbProcess::RawDispatchEvent(
         {
             {
                 PUBLIC_CALLBACK_IN_THIS_SCOPE(this, pLockHolder, pEvent);
-                pCallback4->AfterGarbageCollection(static_cast<ICorDebugController*>(this));
+                pCallback4->AfterGarbageCollection(static_cast<ICorDebugProcess*>(this));
             }
             break;
         }
index d9f25e6..42cf8f8 100644 (file)
@@ -868,8 +868,8 @@ namespace
         virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** pInterface);
         virtual ULONG STDMETHODCALLTYPE AddRef();
         virtual ULONG STDMETHODCALLTYPE Release();
-        COM_METHOD BeforeGarbageCollection(ICorDebugController* pController);
-        COM_METHOD AfterGarbageCollection(ICorDebugController* pController);
+        COM_METHOD BeforeGarbageCollection(ICorDebugProcess* pProcess);
+        COM_METHOD AfterGarbageCollection(ICorDebugProcess* pProcess);
     private:
         // not implemented
         DefaultManagedCallback4(const DefaultManagedCallback4&);
@@ -923,22 +923,22 @@ namespace
     }
 
     HRESULT
-        DefaultManagedCallback4::BeforeGarbageCollection(ICorDebugController* pController)
+        DefaultManagedCallback4::BeforeGarbageCollection(ICorDebugProcess* pProcess)
     {
         //
         // Just ignore and continue the process.
         //
-        pController->Continue(false);
+        pProcess->Continue(false);
         return S_OK;
     }
 
     HRESULT
-        DefaultManagedCallback4::AfterGarbageCollection(ICorDebugController* pController)
+        DefaultManagedCallback4::AfterGarbageCollection(ICorDebugProcess* pProcess)
     {
         //
         // Just ignore and continue the process.
         //
-        pController->Continue(false);
+        pProcess->Continue(false);
         return S_OK;
     }
 }
index 00501da..05fea35 100644 (file)
@@ -1322,29 +1322,29 @@ HRESULT ShimProxyCallback::CustomNotification(ICorDebugThread * pThread, ICorDeb
 //      input:
 //          pController - controller in which the notification occurred
 // Return value: S_OK
-HRESULT ShimProxyCallback::BeforeGarbageCollection(ICorDebugController* pController)
+HRESULT ShimProxyCallback::BeforeGarbageCollection(ICorDebugProcess* pProcess)
 {
     m_pShim->PreDispatchEvent();
     class BeforeGarbageCollectionEvent : public ManagedEvent
     {
         // callbacks parameters. These are strong references
-        RSExtSmartPtr<ICorDebugController > m_pController;
+        RSExtSmartPtr<ICorDebugProcess> m_pProcess;
 
     public:
         // Ctor
-        BeforeGarbageCollectionEvent(ICorDebugController* pController) :
+        BeforeGarbageCollectionEvent(ICorDebugProcess* pProcess) :
             ManagedEvent()
         {
-            this->m_pController.Assign(pController);
+            this->m_pProcess.Assign(pProcess);
         }
 
         HRESULT Dispatch(DispatchArgs args)
         {
-            return args.GetCallback4()->BeforeGarbageCollection(m_pController);
+            return args.GetCallback4()->BeforeGarbageCollection(m_pProcess);
         }
     }; // end class BeforeGarbageCollectionEvent
 
-    m_pShim->GetManagedEventQueue()->QueueEvent(new BeforeGarbageCollectionEvent(pController));
+    m_pShim->GetManagedEventQueue()->QueueEvent(new BeforeGarbageCollectionEvent(pProcess));
     return S_OK;
 }
 
@@ -1353,29 +1353,29 @@ HRESULT ShimProxyCallback::BeforeGarbageCollection(ICorDebugController* pControl
 //      input:
 //          pController - controller in which the notification occurred
 // Return value: S_OK
-HRESULT ShimProxyCallback::AfterGarbageCollection(ICorDebugController* pController)
+HRESULT ShimProxyCallback::AfterGarbageCollection(ICorDebugProcess* pProcess)
 {
     m_pShim->PreDispatchEvent();
     class AfterGarbageCollectionEvent : public ManagedEvent
     {
         // callbacks parameters. These are strong references
-        RSExtSmartPtr<ICorDebugController > m_pController;
+        RSExtSmartPtr<ICorDebugProcess > m_pProcess;
 
     public:
         // Ctor
-        AfterGarbageCollectionEvent(ICorDebugController* pController) :
+        AfterGarbageCollectionEvent(ICorDebugProcess* pProcess) :
             ManagedEvent()
         {
-            this->m_pController.Assign(pController);
+            this->m_pProcess.Assign(pProcess);
         }
 
         HRESULT Dispatch(DispatchArgs args)
         {
-            return args.GetCallback4()->AfterGarbageCollection(m_pController);
+            return args.GetCallback4()->AfterGarbageCollection(m_pProcess);
         }
     }; // end class AfterGarbageCollectionEvent
 
-    m_pShim->GetManagedEventQueue()->QueueEvent(new AfterGarbageCollectionEvent(pController));
+    m_pShim->GetManagedEventQueue()->QueueEvent(new AfterGarbageCollectionEvent(pProcess));
     return S_OK;
 }
 
index 0f2d803..c936b98 100644 (file)
@@ -216,10 +216,10 @@ public:
     ///
 
     // Implementation of ICorDebugManagedCallback4::BeforeGarbageCollection
-    COM_METHOD ShimProxyCallback::BeforeGarbageCollection(ICorDebugController* pController);
+    COM_METHOD ShimProxyCallback::BeforeGarbageCollection(ICorDebugProcess* pProcess);
 
     // Implementation of ICorDebugManagedCallback4::AfterGarbageCollection
-    COM_METHOD ShimProxyCallback::AfterGarbageCollection(ICorDebugController* pController);
+    COM_METHOD ShimProxyCallback::AfterGarbageCollection(ICorDebugProcess* pProcess);
 };
 
 
index 096c0d2..e0a3cb4 100644 (file)
@@ -707,6 +707,7 @@ HRESULT __cdecl CorDBGetInterface(DebugInterface** rcInterface)
 //-----------------------------------------------------------------------------
 void Debugger::SendSimpleIPCEventAndBlock()
 {
+    // TODO, databp, enable these contracts
     /*
     CONTRACTL
     {
@@ -5450,6 +5451,7 @@ DebuggerModule* Debugger::AddDebuggerModule(DomainFile * pDomainFile)
 // Neither pDbgLockHolder nor pAppDomain are used.
 void Debugger::TrapAllRuntimeThreads()
 {
+    // TODO, databp, enable these contracts
     /*
     CONTRACTL
     {
index 69be972..ea9ea2b 100644 (file)
@@ -1359,8 +1359,8 @@ interface ICorDebugManagedCallback3 : IUnknown
 
 interface ICorDebugManagedCallback4 : IUnknown
 {
-    HRESULT BeforeGarbageCollection(ICorDebugController* pController);
-    HRESULT AfterGarbageCollection(ICorDebugController* pController);
+    HRESULT BeforeGarbageCollection(ICorDebugProcess* pProcess);
+    HRESULT AfterGarbageCollection(ICorDebugProcess* pProcess);
 }
 
 
index fd61bd1..55460ca 100644 (file)
@@ -3774,10 +3774,10 @@ EXTERN_C const IID IID_ICorDebugManagedCallback4;
     {
     public:
         virtual HRESULT STDMETHODCALLTYPE BeforeGarbageCollection( 
-            ICorDebugController *pController) = 0;
+            ICorDebugProcess *pProcess) = 0;
         
         virtual HRESULT STDMETHODCALLTYPE AfterGarbageCollection( 
-            ICorDebugController *pController) = 0;
+            ICorDebugProcess *pProcess) = 0;
         
     };
     
@@ -3802,11 +3802,11 @@ EXTERN_C const IID IID_ICorDebugManagedCallback4;
         
         HRESULT ( STDMETHODCALLTYPE *BeforeGarbageCollection )( 
             ICorDebugManagedCallback4 * This,
-            ICorDebugController *pController);
+            ICorDebugProcess *pProcess);
         
         HRESULT ( STDMETHODCALLTYPE *AfterGarbageCollection )( 
             ICorDebugManagedCallback4 * This,
-            ICorDebugController *pController);
+            ICorDebugProcess *pProcess);
         
         END_INTERFACE
     } ICorDebugManagedCallback4Vtbl;
@@ -3831,11 +3831,11 @@ EXTERN_C const IID IID_ICorDebugManagedCallback4;
     ( (This)->lpVtbl -> Release(This) ) 
 
 
-#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pController)    \
-    ( (This)->lpVtbl -> BeforeGarbageCollection(This,pController) ) 
+#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pProcess)       \
+    ( (This)->lpVtbl -> BeforeGarbageCollection(This,pProcess) ) 
 
-#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pController)     \
-    ( (This)->lpVtbl -> AfterGarbageCollection(This,pController) ) 
+#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess)        \
+    ( (This)->lpVtbl -> AfterGarbageCollection(This,pProcess) ) 
 
 #endif /* COBJMACROS */