Skip to content

Commit

Permalink
Merge pull request #1472 from W0ni/fix_example_bp_display
Browse files Browse the repository at this point in the history
Fix display format for jitter breakpoint example
  • Loading branch information
serpilliere committed Feb 25, 2024
2 parents 88d9db2 + b9798fa commit 2b1273e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions example/jitter/memory_breakpoint.py
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

0 comments on commit 2b1273e

Please sign in to comment.