diff options
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r-- | lldb/scripts/Python/interface/SBSection.i | 17 | ||||
-rw-r--r-- | lldb/scripts/Python/interface/SBTarget.i | 88 |
2 files changed, 105 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBSection.i b/lldb/scripts/Python/interface/SBSection.i index 5bbf9ee10d5..c94161e412b 100644 --- a/lldb/scripts/Python/interface/SBSection.i +++ b/lldb/scripts/Python/interface/SBSection.i @@ -90,6 +90,20 @@ public: SectionType GetSectionType (); + %feature("docstring", " + //------------------------------------------------------------------ + /// Return the size of a target's byte represented by this section + /// in numbers of host bytes. Note that certain architectures have + /// varying minimum addressable unit (i.e. byte) size for their + /// CODE or DATA buses. + /// + /// @return + /// The number of host (8-bit) bytes needed to hold a target byte + //------------------------------------------------------------------ + ") GetTargetByteSize; + uint32_t + GetTargetByteSize (); + bool GetDescription (lldb::SBStream &description); @@ -127,6 +141,9 @@ public: __swig_getmethods__["type"] = GetSectionType if _newclass: type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''') + __swig_getmethods__["target_byte_size"] = GetTargetByteSize + if _newclass: target_byte_size = property(GetTargetByteSize, None, doc='''A read only property that returns the size of a target byte represented by this section as a number of host bytes.''') + %} private: diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index 345929a80dc..7a0096c41e3 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -282,6 +282,21 @@ public: lldb::SBProcess GetProcess (); + + %feature("docstring", " + //------------------------------------------------------------------ + /// Return the platform object associated with the target. + /// + /// After return, the platform object should be checked for + /// validity. + /// + /// @return + /// A platform object. + //------------------------------------------------------------------ + ") GetPlatform; + lldb::SBPlatform + GetPlatform (); + %feature("docstring", " //------------------------------------------------------------------ /// Install any binaries that need to be installed. @@ -579,6 +594,30 @@ public: const char * GetTriple (); + %feature("docstring", " + //------------------------------------------------------------------ + /// Architecture data byte width accessor + /// + /// @return + /// The size in 8-bit (host) bytes of a minimum addressable + /// unit from the Architecture's data bus + //------------------------------------------------------------------ + ") GetDataByteSize; + uint32_t + GetDataByteSize (); + + %feature("docstring", " + //------------------------------------------------------------------ + /// Architecture code byte width accessor + /// + /// @return + /// The size in 8-bit (host) bytes of a minimum addressable + /// unit from the Architecture's code bus + //------------------------------------------------------------------ + ") GetCodeByteSize; + uint32_t + GetCodeByteSize (); + lldb::SBError SetSectionLoadAddress (lldb::SBSection section, lldb::addr_t section_base_addr); @@ -676,6 +715,19 @@ public: void Clear (); + %feature("docstring", " + //------------------------------------------------------------------ + /// Resolve a current file address into a section offset address. + /// + /// @param[in] file_addr + /// + /// @return + /// An SBAddress which will be valid if... + //------------------------------------------------------------------ + ") ResolveFileAddress; + lldb::SBAddress + ResolveFileAddress (lldb::addr_t file_addr); + lldb::SBAddress ResolveLoadAddress (lldb::addr_t vm_addr); @@ -686,6 +738,33 @@ public: ResolveSymbolContextForAddress (const SBAddress& addr, uint32_t resolve_scope); + %feature("docstring", " + //------------------------------------------------------------------ + /// Read target memory. If a target process is running then memory + /// is read from here. Otherwise the memory is read from the object + /// files. For a target whose bytes are sized as a multiple of host + /// bytes, the data read back will preserve the target's byte order. + /// + /// @param[in] addr + /// A target address to read from. + /// + /// @param[out] buf + /// The buffer to read memory into. + /// + /// @param[in] size + /// The maximum number of host bytes to read in the buffer passed + /// into this call + /// + /// @param[out] error + /// Error information is written here if the memory read fails. + /// + /// @return + /// The amount of data read in host bytes. + //------------------------------------------------------------------ + ") ReadMemory; + size_t + ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error); + lldb::SBBreakpoint BreakpointCreateByLocation (const char *file, uint32_t line); @@ -904,6 +983,15 @@ public: __swig_getmethods__["triple"] = GetTriple if _newclass: triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''') + + __swig_getmethods__["data_byte_size"] = GetDataByteSize + if _newclass: addr_size = property(GetDataByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the data address space for this target.''') + + __swig_getmethods__["code_byte_size"] = GetCodeByteSize + if _newclass: addr_size = property(GetCodeByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the code address space for this target.''') + + __swig_getmethods__["platform"] = GetPlatform + if _newclass: platform = property(GetPlatform, None, doc='''A read only property that returns the platform associated with with this target.''') %} }; |