Skip to content

Commit

Permalink
dasm: sneak a ref to original di during flatten_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyg committed Oct 20, 2022
1 parent def1dd4 commit 06adbc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metasm/disassemble_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,8 @@ def flatten_graph(entry, include_subfunc=true)
end

b = @decoded[addr].block
# keep a ref to the di, for postprocessing (rip-relative addressing...)
b.list.each { |di| di.instruction.instance_variable_set("@di", di) }
ret.concat b.list.map { |di| di.instruction }

b.each_to_otherfunc(self) { |to|
Expand Down

0 comments on commit 06adbc4

Please sign in to comment.