diff options
Diffstat (limited to 'lldb/scripts/Python')
-rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 18 | ||||
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index 17b880ae03f..56a54ce94c3 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -19,6 +19,7 @@ debug_flag=$5 swig_output_file=${SRC_ROOT}/source/LLDBWrapPython.cpp swig_input_file=${SRC_ROOT}/scripts/lldb.swig +swig_input_file2=${SRC_ROOT}/scripts/Python/python-extensions.swig if [ -n "$debug_flag" -a "$debug_flag" == "-debug" ] @@ -119,6 +120,19 @@ then fi fi +if [ $NeedToUpdate == 0 ] +then + if [ ${swig_input_file2} -nt ${swig_output_file} ] + then + NeedToUpdate=1 + if [ $Debug == 1 ] + then + echo "${swig_input_file2} is newer than ${swig_output_file}" + echo "swig file will need to be re-built." + fi + fi +fi + os_name=`uname -s` python_version=`/usr/bin/python --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'` @@ -147,6 +161,10 @@ then exit 0 else echo "SWIG needs to be re-run." + if [ -f ${swig_output_file} ] + then + rm ${swig_output_file} + fi fi diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index 8a572a7c44e..f52fa918145 100644 --- a/lldb/scripts/Python/python-extensions.swig +++ b/lldb/scripts/Python/python-extensions.swig @@ -23,7 +23,7 @@ %extend lldb::SBBreakpointLocation { PyObject *lldb::SBBreakpointLocation::__repr__ (){ lldb::SBStream description; - $self->GetDescription ("full", description); + $self->GetDescription (lldb::eDescriptionLevelFull, description); return PyString_FromString (description.GetData()); } } @@ -128,7 +128,7 @@ %extend lldb::SBTarget { PyObject *lldb::SBTarget::__repr__ (){ lldb::SBStream description; - $self->GetDescription (description); + $self->GetDescription (description, lldb::eDescriptionLevelBrief); return PyString_FromString (description.GetData()); } } |