diff --git a/bindings/python/setup.py b/bindings/python/setup.py index b031f69e3f..2b3797a8a3 100755 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -118,6 +118,8 @@ def build_libraries(): cmake_args = ["cmake", '-B', BUILD_DIR, '-S', UC_DIR, "-DCMAKE_BUILD_TYPE=" + conf] if os.getenv("TRACE"): cmake_args += ["-DUNICORN_TRACER=on"] + if conf == "Debug": + cmake_args += ["-DUNICORN_LOGGING=on"] subprocess.check_call(cmake_args, cwd=UC_DIR) threads = os.getenv("THREADS", "4") subprocess.check_call(["cmake", "--build", ".", "-j" + threads], cwd=BUILD_DIR) diff --git a/tests/regress/jumping.py b/tests/regress/jumping.py index b7bb109058..8df38c7fbd 100755 --- a/tests/regress/jumping.py +++ b/tests/regress/jumping.py @@ -12,9 +12,9 @@ # rdx would never be set to 0xbabe unless we set zf to 1 CODE = ( b"\x48\x31\xc0" # xor rax, rax - b"\x48\xb8\x04\x00\x00\x00\x00\x00\x00\x00" # movabs rax, 0x4 - b"\x48\x3d\x05\x00\x00\x00" # cmp rax, 0x5 <-- never true, zf is cleared - b"\x74\x05" # je 0x1a + b"\x48\xb8\x04\x00\x00\x00\x00\x00\x00\x00" # 03: movabs rax, 0x4 + b"\x48\x3d\x05\x00\x00\x00" # 0d: cmp rax, 0x5 <-- never true, zf is cleared + b"\x74\x05" # 13: je 0x1a b"\xe9\x0f\x00\x00\x00" # jmp 0x29 b"\x48\xba\xbe\xba\x00\x00\x00\x00\x00\x00" # 1a: movabs rdx, 0xbabe <-- never reached unless we set zf b"\xe9\x0f\x00\x00\x00" # jmp 0x38 diff --git a/tests/regress/regress.py b/tests/regress/regress.py index e0f873eabd..00d5bd4b9b 100755 --- a/tests/regress/regress.py +++ b/tests/regress/regress.py @@ -29,7 +29,7 @@ def __setup_logger(name): logger = __setup_logger('UnicornRegress') -logger.setLevel(logging.INFO) +logger.setLevel(os.environ.get("UNICORN_DEBUG", "INFO").upper()) def main():