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/SBFileSpec.i | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lldb/scripts/Python/interface/SBFileSpec.i') diff --git a/lldb/scripts/Python/interface/SBFileSpec.i b/lldb/scripts/Python/interface/SBFileSpec.i index e2ef74bc93a..d3fae44de8b 100644 --- a/lldb/scripts/Python/interface/SBFileSpec.i +++ b/lldb/scripts/Python/interface/SBFileSpec.i @@ -66,6 +66,18 @@ public: bool GetDescription (lldb::SBStream &description) const; + + %pythoncode %{ + __swig_getmethods__["basename"] = GetFilename + if _newclass: x = property(GetFilename, None) + + __swig_getmethods__["dirname"] = GetDirectory + if _newclass: x = property(GetDirectory, None) + + __swig_getmethods__["exists"] = Exists + if _newclass: x = property(Exists, None) + %} + }; } // namespace lldb -- cgit v1.2.3