Beispiel #1
0
 private static void SetIL(bool fCLR, Pdbx.IL il, uint offset)
 {
     if (fCLR)
     {
         il.CLR = offset;
     }
     else
     {
         il.nanoCLR = offset;
     }
 }
        public CorDebugFunctionBreakpoint(CorDebugFunction function, uint ilCLR) : base(function.AppDomain)
        {
            m_function   = function;
            m_il         = new Pdbx.IL();
            m_il.CLR     = ilCLR;
            m_il.nanoCLR = function.GetILnanoCLRFromILCLR(ilCLR);

            m_breakpointDef.m_IP = m_il.nanoCLR;
            m_breakpointDef.m_md = m_function.MethodDef_Index;

            Active = true;
        }
        public CorDebugFunctionBreakpoint (CorDebugFunction function, uint ilCLR) : base(function.AppDomain)
        {
            m_function   = function;
            m_il         = new Pdbx.IL();
            m_il.CLR     = ilCLR;
            m_il.TinyCLR = function.GetILTinyCLRFromILCLR(ilCLR);

            m_breakpointDef.m_IP  = m_il.TinyCLR;            
            m_breakpointDef.m_md  = m_function.MethodDef_Index;            

            this.Active = true;   
        }
Beispiel #4
0
            public static uint Map(bool fCLR, Pdbx.IL [] ilMap, uint offset)
            {
                ILComparer ilComparer = new ILComparer(fCLR);

                Pdbx.IL il = new Pdbx.IL();
                ilComparer.SetIL(il, offset);
                int  i   = Array.BinarySearch(ilMap, il, ilComparer);
                uint ret = 0;

                if (i >= 0)
                {
                    //Exact match
                    ret = GetIL(!fCLR, ilMap[i]);
                }
                else
                {
                    i = ~i;

                    if (i == 0)
                    {
                        //Before the IL diverges
                        ret = offset;
                    }
                    else
                    {
                        //Somewhere in between
                        i--;

                        il  = ilMap[i];
                        ret = offset - GetIL(fCLR, il) + GetIL(!fCLR, il);
                    }
                }

                Debug.Assert(ret >= 0);
                return(ret);
            }
            public static uint Map(bool fCLR, Pdbx.IL [] ilMap, uint offset)
            {
                ILComparer ilComparer = new ILComparer(fCLR);
                Pdbx.IL il = new Pdbx.IL();
                ilComparer.SetIL(il, offset);
                int i = Array.BinarySearch(ilMap, il, ilComparer);
                uint ret = 0;

                if (i >= 0)
                {
                    //Exact match
                    ret = GetIL(!fCLR, ilMap[i]);
                }
                else
                {

                    i = ~i;

                    if (i == 0)
                    {
                        //Before the IL diverges
                        ret = offset;
                    }
                    else
                    {
                        //Somewhere in between
                        i--;

                        il = ilMap[i];
                        ret = offset - GetIL(fCLR, il) + GetIL(!fCLR, il);
                    }
                }

                Debug.Assert(ret >= 0);
                return ret;
            }
Beispiel #6
0
 private void SetIL(Pdbx.IL il, uint offset)
 {
     SetIL(m_fCLR, il, offset);
 }
Beispiel #7
0
 private uint GetIL(Pdbx.IL il)
 {
     return(GetIL(m_fCLR, il));
 }
Beispiel #8
0
 private static uint GetIL(bool fCLR, Pdbx.IL il)
 {
     return(fCLR ? il.CLR : il.nanoCLR);
 }