llvm-project/lldb/source/Host
Greg Clayton e91b7957b2 Expose new read memory fucntion through python in SBProcess:
size_t
    SBProcess::ReadCStringFromMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);

    uint64_t
    SBProcess::ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error);

    lldb::addr_t
    SBProcess::ReadPointerFromMemory (addr_t addr, lldb::SBError &error);

These ReadCStringFromMemory() has some SWIG type magic that makes it return the
python string directly and the "buf" is not needed:

error = SBError()
max_cstr_len = 256
cstr = lldb.process.ReadCStringFromMemory (0x1000, max_cstr_len, error)
if error.Success():
    ....

The other two functions behave as expteced. This will make it easier to get integer values
from the inferior process that are correctly byte swapped. Also for pointers, the correct
pointer byte size will be used.

Also cleaned up a few printf style warnings for the 32 bit lldb build on darwin.

llvm-svn: 146636
2011-12-15 03:14:23 +00:00
..
common Now that I fixed the uninitialized callback problem, I can enable GCD pid 2011-11-17 19:41:57 +00:00
freebsd Patch by David Forsythe to build lldb on FreeBSD! 2011-08-02 20:52:42 +00:00
linux API fix and missing headers. 2011-05-19 23:07:19 +00:00
macosx Expose new read memory fucntion through python in SBProcess: 2011-12-15 03:14:23 +00:00
Makefile Patch by David Forsythe to build lldb on FreeBSD! 2011-08-02 20:52:42 +00:00