``get_reg_value_at`` gets the value the provided string register address corresponding to the given virtual address :param int addr: virtual address of the instruction to query :param str reg: string value of native register to query :param Architecture arch: (optional) Architecture for th
( self, addr: int, reg: 'architecture.RegisterType', arch: Optional['architecture.Architecture'] = None )
| 1931 | return db, BuiltinType(builtin.value) |
| 1932 | |
| 1933 | def get_reg_value_at( |
| 1934 | self, addr: int, reg: 'architecture.RegisterType', arch: Optional['architecture.Architecture'] = None |
| 1935 | ) -> 'variable.RegisterValue': |
| 1936 | """ |
| 1937 | ``get_reg_value_at`` gets the value the provided string register address corresponding to the given virtual address |
| 1938 | |
| 1939 | :param int addr: virtual address of the instruction to query |
| 1940 | :param str reg: string value of native register to query |
| 1941 | :param Architecture arch: (optional) Architecture for the given function |
| 1942 | :rtype: variable.RegisterValue |
| 1943 | :Example: |
| 1944 | |
| 1945 | >>> current_function.get_reg_value_at(0x400dbe, 'rdi') |
| 1946 | <const 0x2> |
| 1947 | """ |
| 1948 | if arch is None: |
| 1949 | arch = self.arch |
| 1950 | reg = arch.get_reg_index(reg) |
| 1951 | value = core.BNGetRegisterValueAtInstruction(self.handle, arch.handle, addr, reg) |
| 1952 | result = variable.RegisterValue.from_BNRegisterValue(value, arch) |
| 1953 | return result |
| 1954 | |
| 1955 | def get_reg_value_after( |
| 1956 | self, addr: int, reg: 'architecture.RegisterType', arch: Optional['architecture.Architecture'] = None |
no test coverage detected