diff options
| author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-01-25 14:33:35 -0500 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:27 -0400 |
| commit | b0b1bc1684a845ae07df474f6a7e86ada501dadf (patch) | |
| tree | 1f3526c68112796531dbf7f4ad3a20a7af953c50 | |
| parent | 4f47181be689e9cfc2cbce332aa4d538afd35da1 (diff) | |
Tweak ujit disasm output
| -rw-r--r-- | ujit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -15,13 +15,13 @@ module UJIT str << "\n" # Sort the blocks by increasing addresses - blocks.sort_by(&:address).each do |block| - str << "== ISEQ RANGE: [#{block.iseq_start_index},#{block.iseq_end_index}[ ".ljust(80, "=") + blocks.sort_by(&:address).each_with_index do |block, i| + str << "== BLOCK #{i+1}/#{blocks.length} ISEQ RANGE: [#{block.iseq_start_index},#{block.iseq_end_index}[ ".ljust(80, "=") str << "\n" cs.disasm(block.code, 0).each do |i| str << sprintf( - "\t%<address>08X:\t%<instruction>s\t%<details>s\n", + " %<address>08X: %<instruction>s\t%<details>s\n", address: block.address + i.address, instruction: i.mnemonic, details: i.op_str |
