Fix hopper-exported length for procedures
This commit is contained in:
parent
cfeafb1296
commit
3cf7c2665e
32724
GM8E01-0-00/map
32724
GM8E01-0-00/map
File diff suppressed because it is too large
Load Diff
32724
GM8E01-0-00/objects
32724
GM8E01-0-00/objects
File diff suppressed because it is too large
Load Diff
|
@ -35,8 +35,11 @@ if save_loc is not None:
|
|||
elif type == Segment.TYPE_UNICODE:
|
||||
objects.append(CodeObject('WSTR', label_name, addr, length))
|
||||
elif type == Segment.TYPE_PROCEDURE:
|
||||
objects.append(CodeObject('FUNC', label_name, addr, length))
|
||||
proc = seg.getProcedureAtAddress(addr)
|
||||
maxAddr = addr
|
||||
for bb in proc.basicBlockIterator():
|
||||
maxAddr = max(maxAddr, bb.getEndingAddress())
|
||||
objects.append(CodeObject('FUNC', label_name, addr, maxAddr - addr + length))
|
||||
for lvar in proc.getLocalVariableList():
|
||||
if not lvar.name().startswith('var_') and not lvar.name().startswith('arg_'):
|
||||
objects.append(CodeObject('LVAR', lvar.name(), addr, lvar.displacement()))
|
||||
|
|
Loading…
Reference in New Issue