Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display format for jitter breakpoint example #1472

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions example/jitter/memory_breakpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
def memory_breakpoint_handler(jitter):
memory_read = jitter.vm.get_memory_read()
if len(memory_read) > 0:
print("Read at instruction 0x%s:" % jitter.pc)
print("Read at instruction 0x%x:" % jitter.pc)
for start_address, end_address in memory_read:
print("- from %s to %s" % (hex(start_address), hex(end_address)))
print("- from 0x%x to 0x%x" % (start_address, end_address))

memory_write = jitter.vm.get_memory_write()
if len(memory_write) > 0:
print("Write at instruction 0x%s:" % jitter.pc)
print("Write at instruction 0x%x:" % jitter.pc)
for start_address, end_address in memory_write:
print("- from %s to %s" % (hex(start_address), hex(end_address)))
print("- from 0x%x to 0x%x" % (start_address, end_address))

# Cleanup
jitter.vm.set_exception(jitter.vm.get_exception() ^ EXCEPT_BREAKPOINT_MEMORY)
Expand Down
Loading