Exemple #1
0
            public static RegisterNameMap Create(string[] registerNames)
            {
                // TODO: more robust mechanism for determining processor architecture
                RegisterNameMap map = new RegisterNameMap();

                if (registerNames[0][0] == 'r') // registers are prefixed with 'r', assume ARM and initialize its register sets
                {
                    map._map = s_arm32Registers;
                }
                else if (registerNames[0][0] == 'e') // x86 register set
                {
                    map._map = s_X86Registers;
                }
                else
                {
                    // report one global register set
                    map._map = s_allRegisters;
                }
                return(map);
            }
Exemple #2
0
            public static RegisterNameMap Create(string[] registerNames)
            {
                // TODO: more robust mechanism for determining processor architecture
                RegisterNameMap map = new RegisterNameMap();

                if (registerNames.Contains("lr"))
                {
                    map._map = s_arm32Registers;
                }
                else if (registerNames.Contains("eax")) // x86 register set
                {
                    map._map = s_X86Registers;
                }
                else
                {
                    // report one global register set
                    map._map = s_allRegisters;
                }
                return(map);
            }