QoL changes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -12,9 +12,9 @@ from unicorn.x86_const import *
|
||||
# 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
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user