'Explicitly set $sp, by using a ``leave; ret`` gadget'

def migrate(self, next_base):

    if isinstance(next_base, ROP):
        next_base = self.base
    pop_sp = (self.rsp or self.esp)
    pop_bp = (self.rbp or self.ebp)
    leave = self.leave
    if (pop_sp and (len(pop_sp.regs) == 1)):
        self.raw(pop_sp)
        self.raw(next_base)
    elif (pop_bp and leave and (len(pop_bp.regs) == 1)):
        self.raw(pop_bp)
        self.raw((next_base - context.bytes))
        self.raw(leave)
    else:
        log.error('Cannot    find    the    gadgets    to    migrate')
    self.migrated = True
