Python bindings: Fix editable install + Execute Python2.7 workflow tests (#2044)
* Python binding: - Added missing `license` field in pyproject.toml file - Fixed editable mode install and some more code cleanup in setup.py - Refreshed README.md - Replaced f-string formatter in tests with `format` method in order to be py2-compatible - Fixed typos - PEP8 fixes * GitHub Action: Install Python2.7 and run tests for re-tagged wheels on native arch runners only * Python bindings: - Use #x formatter to format hex values
This commit is contained in:
@@ -87,7 +87,8 @@ def test_arm64_read_sctlr():
|
||||
|
||||
def test_arm64_hook_mrs():
|
||||
def _hook_mrs(uc, reg, cp_reg, _):
|
||||
print(f">>> Hook MRS instruction: reg = 0x{reg:x}(UC_ARM64_REG_X2) cp_reg = {cp_reg}")
|
||||
print(">>> Hook MRS instruction: reg = {reg:#x}(UC_ARM64_REG_X2) cp_reg = {cp_reg}".format(reg=reg,
|
||||
cp_reg=cp_reg))
|
||||
uc.reg_write(reg, 0x114514)
|
||||
print(">>> Write 0x114514 to X")
|
||||
|
||||
@@ -111,7 +112,7 @@ def test_arm64_hook_mrs():
|
||||
# Start emulation
|
||||
mu.emu_start(0x1000, 0x1000 + len(ARM64_MRS_CODE))
|
||||
|
||||
print(f">>> X2 = {mu.reg_read(UC_ARM64_REG_X2):x}")
|
||||
print(">>> X2 = {reg:#x}".format(reg=mu.reg_read(UC_ARM64_REG_X2)))
|
||||
|
||||
except UcError as e:
|
||||
print("ERROR: %s" % e)
|
||||
|
||||
Reference in New Issue
Block a user