class Metasm::GdbRemoteString

virtual string to access the remote process memory

Attributes

gdb[RW]

Public Class Methods

new(gdb, addr_start=0, length=nil) click to toggle source
Calls superclass method
# File metasm/os/gdbremote.rb, line 394
def initialize(gdb, addr_start=0, length=nil)
        @gdb = gdb
        length ||= 1 << (@gdb.ptrsz || 32)
        @pagelength = 512
        super(addr_start, length)
end

Public Instance Methods

dup(addr=@addr_start, len=@length) click to toggle source
# File metasm/os/gdbremote.rb, line 401
def dup(addr=@addr_start, len=@length)
        self.class.new(@gdb, addr, len)
end
get_page(addr, len=@pagelength) click to toggle source
# File metasm/os/gdbremote.rb, line 416
def get_page(addr, len=@pagelength)
        @gdb.getmem(addr, len)
end
rewrite_at(addr, data) click to toggle source
# File metasm/os/gdbremote.rb, line 405
def rewrite_at(addr, data)
        len = data.length
        off = 0
        while len > @pagelength
                @gdb.setmem(addr+off, data[off, @pagelength])
                off += @pagelength
                len -= @pagelength
        end
        @gdb.setmem(addr+off, data[off, len])
end