mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Tweak ujit disasm output
This commit is contained in:
parent
4f47181be6
commit
b0b1bc1684
1 changed files with 3 additions and 3 deletions
6
ujit.rb
6
ujit.rb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue