diff options
| author | Caroline Tice <ctice@apple.com> | 2010-10-26 03:11:13 +0000 | 
|---|---|---|
| committer | Caroline Tice <ctice@apple.com> | 2010-10-26 03:11:13 +0000 | 
| commit | ceb6b1393d05e3f5a7a235fd34bcf5d74ecc1f8d (patch) | |
| tree | d49e665f965c7acfc1d122c6c5e1b128a7ef9d5a /lldb/scripts/Python | |
| parent | e96b8d7ab66051f9fcbac5dfffd8dff7544a2909 (diff) | |
| download | llvm-ceb6b1393d05e3f5a7a235fd34bcf5d74ecc1f8d.zip llvm-ceb6b1393d05e3f5a7a235fd34bcf5d74ecc1f8d.tar.gz llvm-ceb6b1393d05e3f5a7a235fd34bcf5d74ecc1f8d.tar.bz2  | |
First pass at adding logging capabilities for the API functions.  At the moment
it logs the function calls, their arguments and the return values.  This is not
complete or polished, but I am committing it now, at the request of someone who
really wants to use it, even though it's not really done.  It currently does not
attempt to log all the functions, just the most important ones.  I will be 
making further adjustments to the API logging code over the next few days/weeks.
(Suggestions for improvements are welcome).
Update the Python build scripts to re-build the swig C++ file whenever 
the python-extensions.swig file is modified.
Correct the help for 'log enable' command (give it the correct number & type of
arguments).
llvm-svn: 117349
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 17b880a..56a54ce 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 8a572a7..f52fa91 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());          }  }  | 
