diff --git a/src/coreclr/debug/daccess/dacfn.cpp b/src/coreclr/debug/daccess/dacfn.cpp index fa4e6dc06e486a..0bc7b8dc00e834 100644 --- a/src/coreclr/debug/daccess/dacfn.cpp +++ b/src/coreclr/debug/daccess/dacfn.cpp @@ -204,87 +204,6 @@ DacWriteAll(TADDR addr, PVOID buffer, ULONG32 size, bool throwEx) return S_OK; } -#ifdef TARGET_UNIX - -static BOOL DacReadAllAdapter(PVOID address, PVOID buffer, SIZE_T size) -{ - DAC_INSTANCE* inst = g_dacImpl->m_instances.Find((TADDR)address); - if (inst == nullptr || inst->size < size) - { - inst = g_dacImpl->m_instances.Alloc((TADDR)address, (ULONG32)size, DAC_PAL); - if (inst == nullptr) - { - return FALSE; - } - inst->noReport = 0; - HRESULT hr = DacReadAll((TADDR)address, inst + 1, (ULONG32)size, false); - if (FAILED(hr)) - { - g_dacImpl->m_instances.ReturnAlloc(inst); - return FALSE; - } - if (!g_dacImpl->m_instances.Add(inst)) - { - g_dacImpl->m_instances.ReturnAlloc(inst); - return FALSE; - } - } - memcpy(buffer, inst + 1, size); - return TRUE; -} - -#ifdef HOST_WINDOWS -// For the cross OS dac, we don't have the full pal layer -// Use these minimal prototypes instead of the full pal header -typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size); - -extern -BOOL -PAL_VirtualUnwindOutOfProc(PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers, PULONG64 functionStart, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback); -#endif - -HRESULT -DacVirtualUnwind(ULONG32 threadId, PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers) -{ - if (!g_dacImpl) - { - DacError(E_UNEXPECTED); - UNREACHABLE(); - } - - // The DAC code doesn't use these context pointers but zero them out to be safe. - if (contextPointers != NULL) - { - memset(contextPointers, 0, sizeof(T_KNONVOLATILE_CONTEXT_POINTERS)); - } - - HRESULT hr = E_NOINTERFACE; - -#ifdef FEATURE_DATATARGET4 - ReleaseHolder dt; - hr = g_dacImpl->m_pTarget->QueryInterface(IID_ICorDebugDataTarget4, (void **)&dt); - if (SUCCEEDED(hr)) - { - hr = dt->VirtualUnwind(threadId, sizeof(CONTEXT), (BYTE*)context); - } -#endif - - if (hr == E_NOINTERFACE || hr == E_NOTIMPL) - { - hr = S_OK; - - SIZE_T baseAddress = DacGlobalBase(); - if (baseAddress == 0 || !PAL_VirtualUnwindOutOfProc(context, contextPointers, nullptr, baseAddress, DacReadAllAdapter)) - { - hr = E_FAIL; - } - } - - return hr; -} - -#endif // TARGET_UNIX - // DacAllocVirtual - Allocate memory from the target process // Note: this is only available to clients supporting the legacy // ICLRDataTarget2 interface. It's currently used by SOS for notification tables. diff --git a/src/coreclr/inc/daccess.h b/src/coreclr/inc/daccess.h index 39f007f35e8d11..4b3a42cfbad0d2 100644 --- a/src/coreclr/inc/daccess.h +++ b/src/coreclr/inc/daccess.h @@ -829,11 +829,6 @@ struct _UNWIND_INFO * DacGetUnwindInfo(TADDR taUnwindInfo); BOOL DacUnwindStackFrame(T_CONTEXT * pContext, T_KNONVOLATILE_CONTEXT_POINTERS* pContextPointers); #endif // FEATURE_EH_FUNCLETS -#if defined(TARGET_UNIX) -// call back through data target to unwind out-of-process -HRESULT DacVirtualUnwind(ULONG32 threadId, PT_CONTEXT context, PT_KNONVOLATILE_CONTEXT_POINTERS contextPointers); -#endif // TARGET_UNIX - #ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS class SString; void DacMdCacheAddEEName(TADDR taEE, const SString& ssEEName); diff --git a/src/coreclr/vm/frames.cpp b/src/coreclr/vm/frames.cpp index f794be8403c6b5..cbb0ecbf75c6c5 100644 --- a/src/coreclr/vm/frames.cpp +++ b/src/coreclr/vm/frames.cpp @@ -1738,16 +1738,6 @@ BOOL TransitionFrame::Protects_Impl(OBJECTREF * ppORef) } #endif //defined (_DEBUG) && !defined (DACCESS_COMPILE) -//+---------------------------------------------------------------------------- -// -// Method: TPMethodFrame::GcScanRoots public -// -// Synopsis: GC protects arguments on the stack -// - -// -//+---------------------------------------------------------------------------- - #ifdef FEATURE_COMINTEROP #ifdef TARGET_X86 diff --git a/src/coreclr/vm/frames.h b/src/coreclr/vm/frames.h index 27c4e7ca3b9301..97fe9702cb0973 100644 --- a/src/coreclr/vm/frames.h +++ b/src/coreclr/vm/frames.h @@ -74,8 +74,6 @@ // | | call count threshold is reached // | | // | +-ExternalMethodFrame - represents a call from an ExternalMethodThunk -// | | -// | +-TPMethodFrame - for calls on transparent proxy // | #ifdef FEATURE_COMINTEROP // +-UnmanagedToManagedFrame - this frame represents a transition from @@ -1228,7 +1226,7 @@ class FramedMethodFrame : public TransitionFrame { #ifdef TARGET_AMD64 // Floating point spill area is between return value and transition block for frames that need it - // (code:TPMethodFrame and code:CLRToCOMMethodFrame) + // (see code:CLRToCOMMethodFrame) return -(4 * 0x10 /* floating point args */ + 0x8 /* alignment pad */ + TransitionBlock::GetNegSpaceSize()) + (iArg * 0x10); #endif } @@ -1254,7 +1252,7 @@ class FramedMethodFrame : public TransitionFrame TADDR p = GetTransitionBlock() - TransitionBlock::GetNegSpaceSize(); #endif // Return value is right before the transition block (or floating point spill area on AMD64) for frames that need it - // (code:TPMethodFrame and code:CLRToCOMMethodFrame) + // (see code:CLRToCOMMethodFrame) #ifdef ENREGISTERED_RETURNTYPE_MAXSIZE p -= ENREGISTERED_RETURNTYPE_MAXSIZE; #else