(self, heap_dump, heap_base)
Heap dump is a dump of the heap from gdb, i.e. the result of the
        following gdb command:

        ``dump binary memory [stack_dump] [begin] [end]``

        :param heap_dump:   The dump file.
        :param heap_base:   The start address of the heap in the gdb session.
Heap dump is a dump of the heap from gdb, i.e. the result of the
        following gdb command:
Heap dump is a dump of the heap from gdb i . e . the result of the following gdb command :
def set_heap(self, heap_dump, heap_base):
        """
        Heap dump is a dump of the heap from gdb, i.e. the result of the
        following gdb command:

        ``dump binary memory [stack_dump] [begin] [end]``

        :param heap_dump:   The dump file.
        :param heap_base:   The start address of the heap in the gdb session.
        """
        # We set the heap at the same addresses as the gdb session to avoid pointer corruption.
        data = self._read_data(heap_dump)
        self.state.heap.heap_location = heap_base + len(data)
        addr = heap_base
        l.info("Set heap from 0x%x to %#x", addr, addr+len(data))
        #FIXME: we should probably make we don't overwrite other stuff loaded there
        self._write(addr, data)
def set_heap ( self , heap_dump , heap_base ) : # We set the heap at the same addresses as the gdb session to avoid pointer corruption. data = self . _read_data ( heap_dump ) self . state . heap . heap_location = heap_base + len ( data ) addr = heap_base l . info ( "Set heap from 0x%x to %#x" , addr , addr + len ( data ) ) #FIXME: we should probably make we don't overwrite other stuff loaded there self . _write ( addr , data )