return bNeedUpdates;
}
+ BOOL UpdateKnownCodeAddress(TADDR mod, CLRDATA_ADDRESS bpLocation)
+ {
+ PendingBreakpoint *pCur = m_breakpoints;
+ BOOL bpSet = FALSE;
+
+ while(pCur)
+ {
+ PendingBreakpoint *pNext = pCur->pNext;
+ if (pCur->ModuleMatches(mod))
+ {
+ IssueDebuggerBPCommand(bpLocation);
+ bpSet = TRUE;
+ break;
+ }
+
+ pCur = pNext;
+ }
+
+ return bpSet;
+ }
+
void RemovePendingForModule(TADDR mod)
{
PendingBreakpoint *pCur = m_breakpoints;
// According to the latest debuggers these callbacks will not get called
// unless the user (or an extension, like SOS :-)) had previously enabled
// clrn with "sxe clrn".
-class CNotification : public IXCLRDataExceptionNotification4
+class CNotification : public IXCLRDataExceptionNotification5
{
static int s_condemnedGen;
|| IsEqualIID(iid, IID_IXCLRDataExceptionNotification)
|| IsEqualIID(iid, IID_IXCLRDataExceptionNotification2)
|| IsEqualIID(iid, IID_IXCLRDataExceptionNotification3)
- || IsEqualIID(iid, IID_IXCLRDataExceptionNotification4))
+ || IsEqualIID(iid, IID_IXCLRDataExceptionNotification4)
+ || IsEqualIID(iid, IID_IXCLRDataExceptionNotification5))
{
- *ppvObject = static_cast<IXCLRDataExceptionNotification4*>(this);
+ *ppvObject = static_cast<IXCLRDataExceptionNotification5*>(this);
AddRef();
return S_OK;
}
*/
STDMETHODIMP OnCodeGenerated(IXCLRDataMethodInstance* method)
{
- // Some method has been generated, make a breakpoint and remove it.
+ m_dbgStatus = DEBUG_STATUS_GO_HANDLED;
+ return S_OK;
+ }
+
+ STDMETHODIMP OnCodeGenerated2(IXCLRDataMethodInstance* method, CLRDATA_ADDRESS nativeCodeLocation)
+ {
+ // Some method has been generated, make a breakpoint.
ULONG32 len = mdNameLen;
LPWSTR szModuleName = (LPWSTR)alloca(mdNameLen * sizeof(WCHAR));
if (method->GetName(0, mdNameLen, &len, g_mdName) == S_OK)
if (pMod->GetName(mdNameLen, &len, szModuleName) == S_OK)
{
ExtOut("JITTED %S!%S\n", szModuleName, g_mdName);
-
- // Add breakpoint, perhaps delete pending breakpoint
+
DacpGetModuleAddress dgma;
if (SUCCEEDED(dgma.Request(pMod)))
{
- g_bpoints.Update(TO_TADDR(dgma.ModulePtr), FALSE);
+ g_bpoints.UpdateKnownCodeAddress(TO_TADDR(dgma.ModulePtr), nativeCodeLocation);
}
else
{
#endif /* C style interface */
+#ifndef __IXCLRDataExceptionNotification5_INTERFACE_DEFINED__
+#define __IXCLRDataExceptionNotification5_INTERFACE_DEFINED__
+
+/* interface IXCLRDataExceptionNotification5 */
+/* [uuid][local][object] */
+
+
+EXTERN_C const IID IID_IXCLRDataExceptionNotification5;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("e77a39ea-3548-44d9-b171-8569ed1a9423")
+ IXCLRDataExceptionNotification5 : public IXCLRDataExceptionNotification4
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE OnCodeGenerated2(
+ /* [in] */ IXCLRDataMethodInstance *method,
+ /* [in] */ CLRDATA_ADDRESS nativeCodeLocation) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct IXCLRDataExceptionNotification5Vtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IXCLRDataExceptionNotification5 * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IXCLRDataExceptionNotification5 * This);
+
+ HRESULT ( STDMETHODCALLTYPE *OnCodeGenerated )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataMethodInstance *method);
+
+ HRESULT ( STDMETHODCALLTYPE *OnCodeDiscarded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataMethodInstance *method);
+
+ HRESULT ( STDMETHODCALLTYPE *OnProcessExecution )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ ULONG32 state);
+
+ HRESULT ( STDMETHODCALLTYPE *OnTaskExecution )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataTask *task,
+ /* [in] */ ULONG32 state);
+
+ HRESULT ( STDMETHODCALLTYPE *OnModuleLoaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataModule *mod);
+
+ HRESULT ( STDMETHODCALLTYPE *OnModuleUnloaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataModule *mod);
+
+ HRESULT ( STDMETHODCALLTYPE *OnTypeLoaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataTypeInstance *typeInst);
+
+ HRESULT ( STDMETHODCALLTYPE *OnTypeUnloaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataTypeInstance *typeInst);
+
+ HRESULT ( STDMETHODCALLTYPE *OnAppDomainLoaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataAppDomain *domain);
+
+ HRESULT ( STDMETHODCALLTYPE *OnAppDomainUnloaded )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataAppDomain *domain);
+
+ HRESULT ( STDMETHODCALLTYPE *OnException )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataExceptionState *exception);
+
+ HRESULT ( STDMETHODCALLTYPE *OnGcEvent )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ GcEvtArgs gcEvtArgs);
+
+ HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataMethodInstance *catchingMethod,
+ DWORD catcherNativeOffset);
+
+ HRESULT ( STDMETHODCALLTYPE *OnCodeGenerated2 )(
+ IXCLRDataExceptionNotification5 * This,
+ /* [in] */ IXCLRDataMethodInstance *method,
+ /* [in] */ CLRDATA_ADDRESS nativeCodeLocation);
+
+ END_INTERFACE
+ } IXCLRDataExceptionNotification5Vtbl;
+
+ interface IXCLRDataExceptionNotification5
+ {
+ CONST_VTBL struct IXCLRDataExceptionNotification5Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IXCLRDataExceptionNotification5_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IXCLRDataExceptionNotification5_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IXCLRDataExceptionNotification5_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IXCLRDataExceptionNotification5_OnCodeGenerated(This,method) \
+ ( (This)->lpVtbl -> OnCodeGenerated(This,method) )
+
+#define IXCLRDataExceptionNotification5_OnCodeDiscarded(This,method) \
+ ( (This)->lpVtbl -> OnCodeDiscarded(This,method) )
+
+#define IXCLRDataExceptionNotification5_OnProcessExecution(This,state) \
+ ( (This)->lpVtbl -> OnProcessExecution(This,state) )
+
+#define IXCLRDataExceptionNotification5_OnTaskExecution(This,task,state) \
+ ( (This)->lpVtbl -> OnTaskExecution(This,task,state) )
+
+#define IXCLRDataExceptionNotification5_OnModuleLoaded(This,mod) \
+ ( (This)->lpVtbl -> OnModuleLoaded(This,mod) )
+
+#define IXCLRDataExceptionNotification5_OnModuleUnloaded(This,mod) \
+ ( (This)->lpVtbl -> OnModuleUnloaded(This,mod) )
+
+#define IXCLRDataExceptionNotification5_OnTypeLoaded(This,typeInst) \
+ ( (This)->lpVtbl -> OnTypeLoaded(This,typeInst) )
+
+#define IXCLRDataExceptionNotification5_OnTypeUnloaded(This,typeInst) \
+ ( (This)->lpVtbl -> OnTypeUnloaded(This,typeInst) )
+
+
+#define IXCLRDataExceptionNotification5_OnAppDomainLoaded(This,domain) \
+ ( (This)->lpVtbl -> OnAppDomainLoaded(This,domain) )
+
+#define IXCLRDataExceptionNotification5_OnAppDomainUnloaded(This,domain) \
+ ( (This)->lpVtbl -> OnAppDomainUnloaded(This,domain) )
+
+#define IXCLRDataExceptionNotification5_OnException(This,exception) \
+ ( (This)->lpVtbl -> OnException(This,exception) )
+
+
+#define IXCLRDataExceptionNotification5_OnGcEvent(This,gcEvtArgs) \
+ ( (This)->lpVtbl -> OnGcEvent(This,gcEvtArgs) )
+
+
+#define IXCLRDataExceptionNotification5_ExceptionCatcherEnter(This,catchingMethod,catcherNativeOffset) \
+ ( (This)->lpVtbl -> ExceptionCatcherEnter(This,catchingMethod,catcherNativeOffset) )
+
+
+#define IXCLRDataExceptionNotification5_OnCodeGenerated2(This,method,nativeCodeLocation) \
+ ( (This)->lpVtbl -> OnCodeGenerated2(This,method,nativeCodeLocation) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IXCLRDataExceptionNotification5_INTERFACE_DEFINED__ */
+
+
#endif /* __IXCLRDataExceptionNotification4_INTERFACE_DEFINED__ */