fix for issue #16289 (#16291)
[platform/upstream/coreclr.git] / src / debug / di / breakpoint.cpp
index 1e381a5..d8e8a3f 100644 (file)
@@ -15,7 +15,7 @@
 
 CordbBreakpoint::CordbBreakpoint(CordbProcess * pProcess, CordbBreakpointType bpType)
   : CordbBase(pProcess, 0, enumCordbBreakpoint), 
-  m_active(false), m_type(bpType)
+  m_active(false), m_pAppDomain(NULL), m_type(bpType)
 {
 }
 
@@ -57,9 +57,11 @@ HRESULT CordbBreakpoint::BaseIsActive(BOOL *pbActive)
  * ------------------------------------------------------------------------- */
 
 CordbFunctionBreakpoint::CordbFunctionBreakpoint(CordbCode *code,
-                                                 SIZE_T offset)
+                                                 SIZE_T offset,
+                                                 BOOL offsetIsIl)
   : CordbBreakpoint(code->GetProcess(), CBT_FUNCTION), 
-  m_code(code), m_offset(offset)
+  m_code(code), m_offset(offset),
+  m_offsetIsIl(offsetIsIl)
 {
     // Remember the app domain we came from so that breakpoints can be
     // deactivated from within the ExitAppdomain callback.
@@ -203,11 +205,11 @@ HRESULT CordbFunctionBreakpoint::Activate(BOOL fActivate)
         pEvent->BreakpointData.vmDomainFile = m_code->GetModule()->GetRuntimeDomainFile();
         pEvent->BreakpointData.encVersion = m_code->GetVersion();
 
-        BOOL fIsIL = m_code->IsIL();
+        BOOL codeIsIL = m_code->IsIL();
 
-        pEvent->BreakpointData.isIL = fIsIL ? true : false;
+        pEvent->BreakpointData.isIL = m_offsetIsIl ? true : false;
         pEvent->BreakpointData.offset = m_offset;
-        if (fIsIL)
+        if (codeIsIL)
         {
             pEvent->BreakpointData.nativeCodeMethodDescToken = pEvent->BreakpointData.nativeCodeMethodDescToken.NullPtr();
         }