{
PUBLIC_CALLBACK_IN_THIS_SCOPE(this, pLockHolder, pEvent);
- pCallback4->DataBreakpoint(static_cast<ICorDebugProcess*>(this), pThread, reinterpret_cast<BYTE*>(&(pEvent->DataBreakpointData.context)), sizeof(CONTEXT));
+ pCallback4->DataBreakpoint(static_cast<ICorDebugProcess*>(this), pThread);
}
break;
}
virtual ULONG STDMETHODCALLTYPE Release();
COM_METHOD BeforeGarbageCollection(ICorDebugProcess* pProcess);
COM_METHOD AfterGarbageCollection(ICorDebugProcess* pProcess);
- COM_METHOD DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
+ COM_METHOD DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread);
private:
// not implemented
DefaultManagedCallback4(const DefaultManagedCallback4&);
}
HRESULT
- DefaultManagedCallback4::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize)
+ DefaultManagedCallback4::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread)
{
//
// Just ignore and continue the process.
// input:
// pProcess - process in which the notification occurred
// Return value: S_OK
-HRESULT ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize)
+HRESULT ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread)
{
m_pShim->PreDispatchEvent();
class DataBreakpointEvent : public ManagedEvent
// callbacks parameters. These are strong references
RSExtSmartPtr<ICorDebugProcess> m_pProcess;
RSExtSmartPtr<ICorDebugThread> m_pThread;
- BYTE* m_pContext;
- ULONG32 m_contextSize;
public:
// Ctor
- DataBreakpointEvent(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize) :
+ DataBreakpointEvent(ICorDebugProcess* pProcess, ICorDebugThread* pThread) :
ManagedEvent()
{
this->m_pProcess.Assign(pProcess);
this->m_pThread.Assign(pThread);
- this->m_pContext = pContext;
- this->m_contextSize = contextSize;
}
HRESULT Dispatch(DispatchArgs args)
{
- return args.GetCallback4()->DataBreakpoint(m_pProcess, m_pThread, m_pContext, m_contextSize);
+ return args.GetCallback4()->DataBreakpoint(m_pProcess, m_pThread);
}
}; // end class AfterGarbageCollectionEvent
- m_pShim->GetManagedEventQueue()->QueueEvent(new DataBreakpointEvent(pProcess, pThread, pContext, contextSize));
+ m_pShim->GetManagedEventQueue()->QueueEvent(new DataBreakpointEvent(pProcess, pThread));
return S_OK;
}
COM_METHOD ShimProxyCallback::AfterGarbageCollection(ICorDebugProcess* pProcess);
// Implementation of ICorDebugManagedCallback4::DataBreakpoint
- COM_METHOD ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread, BYTE* pContext, ULONG32 contextSize);
+ COM_METHOD ShimProxyCallback::DataBreakpoint(ICorDebugProcess* pProcess, ICorDebugThread* pThread);
};
Thread *thread,
TRIGGER_WHY tyWhy)
{
+#ifdef FEATURE_PAL
+ #error Not supported
+#endif // FEATURE_PAL
+#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
+ CONTEXT *context = g_pEEInterface->GetThreadFilterContext(thread);
+ context->Dr0 = this->m_context.Dr0;
+ context->Dr1 = this->m_context.Dr1;
+ context->Dr2 = this->m_context.Dr2;
+ context->Dr3 = this->m_context.Dr3;
+ context->Dr6 = this->m_context.Dr6;
+ context->Dr7 = this->m_context.Dr7;
+#else // defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
+ #error Not supported
+#endif // defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
return TPR_TRIGGER;
}
LOG((LF_CORDB, LL_INFO10000, "DDBP::SE: in DebuggerDataBreakpoint's SendEvent\n"));
- g_pDebugger->SendDataBreakpoint(thread, &m_context, this);
+ CONTEXT *context = g_pEEInterface->GetThreadFilterContext(thread);
+
+ g_pDebugger->SendDataBreakpoint(thread, context, this);
Delete();
// Send a breakpoint event to the Right Side
DebuggerIPCEvent* ipce = m_pRCThread->GetIPCEventSendBuffer();
- memcpy(&(ipce->DataBreakpointData.context), context, sizeof(CONTEXT));
InitIPCEvent(ipce,
DB_IPCE_DATA_BREAKPOINT,
thread,
struct MSLAYOUT
{
- CONTEXT context;
- } DataBreakpointData;
-
- struct MSLAYOUT
- {
LSPTR_STEPPER stepperToken;
VMPTR_Thread vmThreadToken;
FramePointer frameToken;
case DB_IPCE_ATTACHING:
case DB_IPCE_GET_NGEN_COMPILER_FLAGS:
case DB_IPCE_DETACH_FROM_PROCESS:
- case DB_IPCE_CONTROL_C_EVENT_RESULT:
- cbAdditionalSize = 0;
- break;
+ case DB_IPCE_CONTROL_C_EVENT_RESULT:
case DB_IPCE_DATA_BREAKPOINT:
- cbAdditionalSize = sizeof(pEvent->DataBreakpointData);
+ cbAdditionalSize = 0;
break;
case DB_IPCE_BREAKPOINT:
// Callback indicating a data breakpoint is hit
//
// Parameters
- // pProcess - the process that hits the data breakpoint
- // pThread - the thread that hits the data breakpoint
- // pContext - a pointer to the CONTEXT structure
- // contextSize - the size of the CONTEXT structure
+ // pProcess - the process that hits the data breakpoint
+ // pThread - the thread that hits the data breakpoint
//
// Returns
// S_OK - on success
//
- HRESULT DataBreakpoint([in] ICorDebugProcess* pProcess, [in] ICorDebugThread* pThread, [in] BYTE* pContext, [in] ULONG32 contextSize);
+ HRESULT DataBreakpoint([in] ICorDebugProcess* pProcess, [in] ICorDebugThread* pThread);
}
#pragma warning(disable:28718) /* disable warning 28718 for interface ICorDebugManagedCallback2 */
virtual HRESULT STDMETHODCALLTYPE DataBreakpoint(
/* [in] */ ICorDebugProcess *pProcess,
- /* [in] */ ICorDebugThread *pThread,
- /* [in] */ BYTE *pContext,
- /* [in] */ ULONG32 contextSize) = 0;
+ /* [in] */ ICorDebugThread *pThread) = 0;
};
HRESULT ( STDMETHODCALLTYPE *DataBreakpoint )(
ICorDebugManagedCallback4 * This,
/* [in] */ ICorDebugProcess *pProcess,
- /* [in] */ ICorDebugThread *pThread,
- /* [in] */ BYTE *pContext,
- /* [in] */ ULONG32 contextSize);
+ /* [in] */ ICorDebugThread *pThread);
END_INTERFACE
} ICorDebugManagedCallback4Vtbl;
#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess) \
( (This)->lpVtbl -> AfterGarbageCollection(This,pProcess) )
-#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread,pContext,contextSize) \
- ( (This)->lpVtbl -> DataBreakpoint(This,pProcess,pThread,pContext,contextSize) )
+#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread) \
+ ( (This)->lpVtbl -> DataBreakpoint(This,pProcess,pThread) )
#endif /* COBJMACROS */