Commit Graph

11 Commits

Author SHA1 Message Date
Greg Clayton 81e871ed76 Convert all python objects in our API to use overload the __str__ method
instead of the __repr__. __repr__ is a function that should return an
expression that can be used to recreate an python object and we were using
it to just return a human readable string.

Fixed a crasher when using the new implementation of SBValue::Cast(SBType).

Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
improvements to the API.

Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
correctly handle not having a target.

llvm-svn: 149743
2012-02-04 02:27:34 +00:00
Johnny Chen 5a0bee7c5f The extra burden for the Python API test case to assign its process object to self.process
in order to have its process cleaned up (terminated) upon tearDown is gone for good.
Let's simplify a bunch of Python API test cases.

llvm-svn: 133097
2011-06-15 22:14:12 +00:00
Johnny Chen 4ebd019b97 Now that we have added a post-processing step for adding truth value testing to
those lldb objects which implement the IsValid() method, let's change the rest of
the test suite to use the more compact truth value testing pattern (the Python way).

llvm-svn: 131970
2011-05-24 18:22:45 +00:00
Johnny Chen 9ae982053f Convert the rest of the test suite to use the lldbutil.get_description() utility function.
llvm-svn: 130041
2011-04-23 00:34:56 +00:00
Johnny Chen aedbe0f347 Converted to use SBProcess.LaunchSimple().
llvm-svn: 129793
2011-04-19 19:50:43 +00:00
Johnny Chen d61816b5b8 Add TestTargetAPI.py:
// When stopped on breakppint 1, and then 2, we can get the line entries using
// SBFrame API SBFrame.GetLineEntry().  We'll get the start addresses for the
// two line entries; with the start address (of SBAddress type), we can then
// resolve the symbol context using the SBTarget API
// SBTarget.ResolveSymbolContextForAddress().
//
// The two symbol context should point to the same symbol, i.e., 'a' function.


Add two utility functions to lldbutil.py:

o get_stopped_threads(process, reason):

  return the list of threads with the specified stop reason or an empty list if not found

o get_stopped_thread(process, reason):

  return the first thread with the given stop reason or None if not found

llvm-svn: 126916
2011-03-03 01:41:57 +00:00
Johnny Chen d762ff1faa Modify test scripts to accomodate SBTarget.Launch() API change.
llvm-svn: 124828
2011-02-03 23:15:53 +00:00
Greg Clayton 6f907e69e9 Deprecated old forms of SBTarget::Launch. There is not just one and no
SWIG renaming done to work around deprecated APIs.

llvm-svn: 124075
2011-01-23 17:46:22 +00:00
Johnny Chen cdbe594841 No need to pass an empty string as an arg or as an env string to the SBTarget.LaunchProcess() API.
llvm-svn: 122450
2010-12-22 22:56:19 +00:00
Johnny Chen 62f68ee564 Use SBModule.GetDescription(SBStream) API to get the module description to match
against.

llvm-svn: 121989
2010-12-16 18:37:46 +00:00
Johnny Chen 6becf1c924 Add python_api/symbol-context to test getting the symbol context while stopped
on a frame and to exercise the methods of SBSymbolContext.

llvm-svn: 121941
2010-12-16 01:41:37 +00:00