From 13d1950ae6eaf579cbecab1c0515d58f5fa2b648 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sun, 29 Jan 2012 06:07:39 +0000 Subject: Added the ability to get the target triple, byte order and address byte size from the SBTarget and SBModule interfaces. Also added many python properties for easier access to many things from many SB objects. llvm-svn: 149191 --- lldb/scripts/Python/interface/SBModule.i | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'lldb/scripts/Python/interface/SBModule.i') diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i index 08e5c18..547b4a2 100644 --- a/lldb/scripts/Python/interface/SBModule.i +++ b/lldb/scripts/Python/interface/SBModule.i @@ -236,6 +236,43 @@ public: FindGlobalVariables (lldb::SBTarget &target, const char *name, uint32_t max_matches); + + lldb::ByteOrder + GetByteOrder (); + + uint32_t + GetAddressByteSize(); + + const char * + GetTriple (); + + %pythoncode %{ + __swig_getmethods__["file"] = GetFileSpec + if _newclass: x = property(GetFileSpec, None) + + __swig_getmethods__["platform_file"] = GetPlatformFileSpec + if _newclass: x = property(GetPlatformFileSpec, None) + + __swig_getmethods__["uuid"] = GetUUIDString + if _newclass: x = property(GetUUIDString, None) + + __swig_getmethods__["byte_order"] = GetByteOrder + if _newclass: x = property(GetByteOrder, None) + + __swig_getmethods__["addr_size"] = GetAddressByteSize + if _newclass: x = property(GetAddressByteSize, None) + + __swig_getmethods__["triple"] = GetTriple + if _newclass: x = property(GetTriple, None) + + __swig_getmethods__["num_symbols"] = GetNumSymbols + if _newclass: x = property(GetNumSymbols, None) + + __swig_getmethods__["num_sections"] = GetNumSections + if _newclass: x = property(GetNumSections, None) + + %} + }; } // namespace lldb -- cgit v1.1