Skip to content

Commit

Permalink
A few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shinh committed May 16, 2015
1 parent 7daa398 commit 1ebae8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dis.rb
Expand Up @@ -230,8 +230,8 @@ def get_data(addr)
dump.each_line do |line|
addr = line.hex

if exe.is_pie && ebx_thunk
if line =~ /call\s+#{"%x"%ebx_thunk}/
if ebx_thunk
if line =~ /call\s+(0x)?#{"%x"%ebx_thunk}/
ebx = addr + 5
elsif line =~ /add\s+\$0x(\h+),%ebx/
#puts "%x => %x" % [ebx, ebx + $1.hex]
Expand Down Expand Up @@ -266,7 +266,7 @@ def get_data(addr)
operands.split(',').each do |operand|
if operand =~ /(-?0x\h+)\((%rip|%ebx)\)/
if $2 == '%ebx'
if exe.is_pie
if exe.is_pie || ebx_thunk
a = ebx + $1.hex
end
else
Expand Down

0 comments on commit 1ebae8d

Please sign in to comment.