This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add gdb.read_memory, gdb.write_memory and gdb.Membuf.

>>>>> "Thiago" == Thiago Jung Bauermann <> writes:

Thiago> One thing which has been in the back of my mind for the Python support
Thiago> in GDB is a way to read and write from/to the inferior memory. This
Thiago> patch addresses that.


Thiago> It's very simple: gdb.read_memory takes an address and a
Thiago> length and reads the bytes from the inferior, placing them in
Thiago> a Python buffer object. gdb.write_memory takes an address and
Thiago> a Python object supporting the buffer protocol[0] (i.e., the
Thiago> object from read_memory, an array or a string) and writes it
Thiago> to the inferior memory.

I was wondering whether we should have a buffer object be the access
method.  That is, provide a new class, implementing the buffer
protocol, which provides "direct" access to inferior memory; it
could have a constructor accepting an address and a size.  Then,
explicit read/write calls would not be needed.q

Is this feasible?  Would it perform well enough?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]