Subtract the ASLR rebase delta in the export-dt-ini script.

develop
Alexander Gavrilov 2013-05-09 18:58:52 +04:00
parent 8924d7e7a6
commit cafa966be4
1 changed files with 2 additions and 0 deletions

@ -8,6 +8,7 @@ local ms = require 'memscan'
local globals = df.global local globals = df.global
local global_addr = dfhack.internal.getAddress local global_addr = dfhack.internal.getAddress
local os_type = dfhack.getOSType() local os_type = dfhack.getOSType()
local rdelta = dfhack.internal.getRebaseDelta()
local vbias = 0 local vbias = 0
if os_type == 'windows' then vbias = -4 end if os_type == 'windows' then vbias = -4 end
@ -39,6 +40,7 @@ local function address(name,bias,base,field,...)
if base == globals then if base == globals then
addr = global_addr(field) addr = global_addr(field)
bias = bias - rdelta
if addr and select('#',...) > 0 then if addr and select('#',...) > 0 then
_,addr = df.sizeof(ms.field_ref(base,field,...)) _,addr = df.sizeof(ms.field_ref(base,field,...))
end end