def __rebase_globals(old, new, size, iterable):
node = internal.comment.tagging.node()
failure, total = [], list(iterable)
for i, (ea, count) in enumerate(total):
# remove the old address
ok = internal.netnode.alt.remove(node, ea)
if not ok:
logging.fatal("{:s}.rebase : Failure trying to remove refcount for {:x} : {!r}".format(__name__, ea, count))
# now add the new address
res = ea - old + new
ok = internal.netnode.alt.set(node, res, count)
if not ok:
logging.fatal("{:s}.rebase : Failure trying to store refcount from {:x} to {:x} : {!r}".format(__name__, ea, res, count))
failure.append((ea, res, count))
yield i, ea
return
# address naming
评论列表
文章目录