diff options
author | Andrew Au <andrewau@microsoft.com> | 2018-11-05 11:34:49 -0800 |
---|---|---|
committer | Andrew Au <cshung@gmail.com> | 2018-11-06 18:34:47 -0800 |
commit | 53e0cce55692cd568a1dce218a2089146aa8e4f8 (patch) | |
tree | 4c687e6e19a0bc7922eb248f0fc6e6b69b747d57 /src/debug/di | |
parent | 6b58f84275cc05ff3fbf003a70a5034fa5ecdf77 (diff) | |
download | coreclr-53e0cce55692cd568a1dce218a2089146aa8e4f8.tar.gz coreclr-53e0cce55692cd568a1dce218a2089146aa8e4f8.tar.bz2 coreclr-53e0cce55692cd568a1dce218a2089146aa8e4f8.zip |
Pull out GetContainingObject
Diffstat (limited to 'src/debug/di')
-rw-r--r-- | src/debug/di/divalue.cpp | 34 | ||||
-rw-r--r-- | src/debug/di/process.cpp | 52 | ||||
-rw-r--r-- | src/debug/di/rspriv.h | 83 |
3 files changed, 5 insertions, 164 deletions
diff --git a/src/debug/di/divalue.cpp b/src/debug/di/divalue.cpp index 4d0fdab4c5..59cd382085 100644 --- a/src/debug/di/divalue.cpp +++ b/src/debug/di/divalue.cpp @@ -485,12 +485,6 @@ HRESULT CordbValue::InternalCreateHandle(CorDebugHandleType handleType, return S_OK; } // CordbValue::InternalCreateHandle -COM_METHOD CordbValue::GetContainingObject(ICorDebugObjectValue** ppContainingObject) -{ - PUBLIC_API_ENTRY(this); - return GetProcess()->GetContainingObject(this, ppContainingObject); -} - /* ------------------------------------------------------------------------- * * Generic Value class * ------------------------------------------------------------------------- */ @@ -587,10 +581,6 @@ HRESULT CordbGenericValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugGenericValue) { *pInterface = static_cast<ICorDebugGenericValue*>(this); @@ -852,10 +842,6 @@ HRESULT CordbReferenceValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugReferenceValue) { *pInterface = static_cast<ICorDebugReferenceValue*>(this); @@ -1804,10 +1790,6 @@ HRESULT CordbObjectValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugObjectValue) { *pInterface = static_cast<ICorDebugObjectValue*>(this); @@ -2745,10 +2727,6 @@ HRESULT CordbVCObjectValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugObjectValue) { *pInterface = static_cast<ICorDebugObjectValue*>(this); @@ -3150,10 +3128,6 @@ HRESULT CordbBoxValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugBoxValue) { *pInterface = static_cast<ICorDebugBoxValue*>(this); @@ -3394,10 +3368,6 @@ HRESULT CordbArrayValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugArrayValue) { *pInterface = static_cast<ICorDebugArrayValue*>(this); @@ -4117,10 +4087,6 @@ HRESULT CordbHandleValue::QueryInterface(REFIID id, void **pInterface) { *pInterface = static_cast<ICorDebugValue3*>(this); } - else if (id == IID_ICorDebugValue4) - { - *pInterface = static_cast<ICorDebugValue4*>(this); - } else if (id == IID_ICorDebugReferenceValue) { *pInterface = static_cast<ICorDebugReferenceValue*>(this); diff --git a/src/debug/di/process.cpp b/src/debug/di/process.cpp index bca9c26aae..a5116f711f 100644 --- a/src/debug/di/process.cpp +++ b/src/debug/di/process.cpp @@ -2532,58 +2532,6 @@ COM_METHOD CordbProcess::EnableExceptionCallbacksOutsideOfMyCode(BOOL enableExce return hr; } -COM_METHOD CordbProcess::GetContainingObject(CordbValue* pValue, ICorDebugObjectValue** ppContainingObject) -{ - if (!ppContainingObject) - return E_POINTER; - - HRESULT hr = S_OK; - - FAIL_IF_NEUTERED(this); - ATT_REQUIRE_STOPPED_MAY_FAIL(this); - - CORDB_ADDRESS interiorPointer; - IfFailRet(pValue->GetAddress(&interiorPointer)); - - *ppContainingObject = nullptr; - - if (interiorPointer == 0) - { - return S_FALSE; - } - - DebuggerIPCEvent event; - this->InitIPCEvent(&event, - DB_IPCE_GET_CONTAINER, - true, - VMPTR_AppDomain::NullPtr()); - - event.GetContainer.interiorPointer = CORDB_ADDRESS_TO_PTR(interiorPointer); - - hr = this->SendIPCEvent(&event, sizeof(DebuggerIPCEvent)); - hr = WORST_HR(hr, event.hr); - - if (SUCCEEDED(hr)) - { - _ASSERTE(event.type == DB_IPCE_GET_CONTAINER_RESULT); - CORDB_ADDRESS containerAddress = PTR_TO_CORDB_ADDRESS(event.GetContainerResult.answer); - if (containerAddress == 0) - { - hr = S_FALSE; - } - else - { - if (SUCCEEDED(hr)) - { - CordbAppDomain* pAppDomain = pValue->GetAppDomain(); - hr = this->GetObjectInternal(containerAddress, pAppDomain, ppContainingObject); - } - } - } - - return hr; -} - COM_METHOD CordbProcess::EnableGCNotificationEvents(BOOL fEnable) { HRESULT hr = S_OK; diff --git a/src/debug/di/rspriv.h b/src/debug/di/rspriv.h index b1828c21b3..8b388ee684 100644 --- a/src/debug/di/rspriv.h +++ b/src/debug/di/rspriv.h @@ -3154,8 +3154,6 @@ public: // Methods not exposed via a COM interface. //----------------------------------------------------------- - COM_METHOD GetContainingObject(CordbValue* pCordbValue, ICorDebugObjectValue** ppContainingObject); - HRESULT ContinueInternal(BOOL fIsOutOfBand); HRESULT StopInternal(DWORD dwTimeout, VMPTR_AppDomain pAppDomainToken); @@ -3438,8 +3436,7 @@ public: type == DB_IPCE_INTERCEPT_EXCEPTION || type == DB_IPCE_GET_NGEN_COMPILER_FLAGS || type == DB_IPCE_SET_NGEN_COMPILER_FLAGS || - type == DB_IPCE_SET_VALUE_CLASS || - type == DB_IPCE_GET_CONTAINER); + type == DB_IPCE_SET_VALUE_CLASS); ipce->type = type; ipce->hr = S_OK; @@ -8719,10 +8716,6 @@ public: return (S_OK); } - //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject); virtual HRESULT STDMETHODCALLTYPE GetAddress(CORDB_ADDRESS *pAddress) = 0; //----------------------------------------------------------- @@ -8852,7 +8845,7 @@ public: * Generic Value class * ------------------------------------------------------------------------- */ -class CordbGenericValue : public CordbValue, public ICorDebugGenericValue, public ICorDebugValue2, public ICorDebugValue3, public ICorDebugValue4 +class CordbGenericValue : public CordbValue, public ICorDebugGenericValue, public ICorDebugValue2, public ICorDebugValue3 { public: CordbGenericValue(CordbAppDomain * appdomain, @@ -8945,15 +8938,6 @@ public: } //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugGenericValue //----------------------------------------------------------- @@ -8990,7 +8974,7 @@ private: * Reference Value class * ------------------------------------------------------------------------- */ -class CordbReferenceValue : public CordbValue, public ICorDebugReferenceValue, public ICorDebugValue2, public ICorDebugValue3, public ICorDebugValue4 +class CordbReferenceValue : public CordbValue, public ICorDebugReferenceValue, public ICorDebugValue2, public ICorDebugValue3 { public: CordbReferenceValue(CordbAppDomain * pAppdomain, @@ -9062,15 +9046,6 @@ public: } //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugReferenceValue //----------------------------------------------------------- @@ -9181,7 +9156,6 @@ class CordbObjectValue : public CordbValue, public ICorDebugStringValue, public ICorDebugValue2, public ICorDebugValue3, - public ICorDebugValue4, public ICorDebugHeapValue2, public ICorDebugHeapValue3, public ICorDebugExceptionObjectValue, @@ -9241,15 +9215,6 @@ public: COM_METHOD GetSize64(ULONG64 *pSize); //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugHeapValue //----------------------------------------------------------- @@ -9368,7 +9333,7 @@ private: class CordbVCObjectValue : public CordbValue, public ICorDebugObjectValue, public ICorDebugObjectValue2, public ICorDebugGenericValue, public ICorDebugValue2, - public ICorDebugValue3, public ICorDebugValue4 + public ICorDebugValue3 { public: CordbVCObjectValue(CordbAppDomain * pAppdomain, @@ -9440,15 +9405,6 @@ public: } //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugObjectValue //----------------------------------------------------------- @@ -9512,7 +9468,6 @@ class CordbBoxValue : public CordbValue, public ICorDebugGenericValue, public ICorDebugValue2, public ICorDebugValue3, - public ICorDebugValue4, public ICorDebugHeapValue2, public ICorDebugHeapValue3 { @@ -9587,15 +9542,6 @@ public: } //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugHeapValue //----------------------------------------------------------- @@ -9650,7 +9596,6 @@ class CordbArrayValue : public CordbValue, public ICorDebugGenericValue, public ICorDebugValue2, public ICorDebugValue3, - public ICorDebugValue4, public ICorDebugHeapValue2, public ICorDebugHeapValue3 { @@ -9721,15 +9666,6 @@ public: } //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugHeapValue //----------------------------------------------------------- @@ -9812,7 +9748,7 @@ private: }; -class CordbHandleValue : public CordbValue, public ICorDebugHandleValue, public ICorDebugValue2, public ICorDebugValue3, public ICorDebugValue4 +class CordbHandleValue : public CordbValue, public ICorDebugHandleValue, public ICorDebugValue2, public ICorDebugValue3 { public: CordbHandleValue(CordbAppDomain *appdomain, @@ -9893,15 +9829,6 @@ public: COM_METHOD GetSize64(ULONG64 *pSize); //----------------------------------------------------------- - // ICorDebugValue4 - //----------------------------------------------------------- - - COM_METHOD GetContainingObject(ICorDebugObjectValue** ppContainingObject) - { - return (CordbValue::GetContainingObject(ppContainingObject)); - } - - //----------------------------------------------------------- // ICorDebugReferenceValue interface //----------------------------------------------------------- |