'Stack dump is a dump of the stack from gdb, i.e. the result of the following gdb command :
``dump binary memory [stack_dump] [begin_addr] [end_addr]``
We set the stack to the same addresses as the gdb session to avoid pointers corruption.
:param stack_dump:  The dump file.
:param stack_top:   The address of the top of the stack in the gdb session.'

def set_stack(self, stack_dump, stack_top):

    data = self._read_data(stack_dump)
    self.real_stack_top = stack_top
    addr = (stack_top - len(data))
    l.info(('Setting    stack    from    0x%x    up    to    0x%x' % (addr, stack_top)))
    self._write(addr, data)
