aboutsummaryrefslogtreecommitdiff
path: root/lldb/scripts/Python/modify-python-lldb.py
AgeCommit message (Collapse)AuthorFilesLines
2011-06-01Make it clear that the Python script modify-python-lldb.py is responsible ↵Johnny Chen1-0/+8
for post-processing the SWIG-generated lldb.py module by adding comments in the post-processed file in order to facilitate reading of the code. llvm-svn: 132417
2011-06-01Fix comment.Johnny Chen1-1/+1
llvm-svn: 132412
2011-05-24Added comment.Johnny Chen1-0/+1
llvm-svn: 132019
2011-05-24Comment change.Johnny Chen1-1/+1
llvm-svn: 132018
2011-05-24Fix a potential bug resulting from the wrong assumption that SWIG puts out ↵Johnny Chen1-8/+8
the __init__ method definition before other method definitions. Instead, do without it and process the class with IsValid() method definition in all possible states. llvm-svn: 132016
2011-05-24Update comment.Johnny Chen1-1/+2
llvm-svn: 132002
2011-05-17Add truth value testing to those lldb Python objects with the IsValid() ↵Johnny Chen1-5/+33
method definitions. object.__nonzero__(self) is called to implement truth value testing and the built-in operation bool(), via a simple delegation to self.IsValid(). Change tests under python_api/lldbutil to utilize this mechanism. llvm-svn: 131494
2011-05-16Add implementation of built-in function len() for those lldb containers withJohnny Chen1-1/+7
unambiguous iteration support. So that we could, for example: ... REGs = lldbutil.get_GPRs(frame) print "Number of general purpose registers: %d" % len(REGs) for reg in REGs: print "%s => %s" %(reg.GetName(), reg.GetValue()) ... llvm-svn: 131418
2011-05-02Add implementation of '==' and '!=' for SBFileSpec and SBModule. Modify a ↵Johnny Chen1-4/+23
test case to take advantage of 'ths_module == that_module'. llvm-svn: 130709
2011-05-02Fix a typo in comment.Johnny Chen1-1/+1
llvm-svn: 130698
2011-04-29Update comments.Johnny Chen1-2/+2
llvm-svn: 130533
2011-04-29Fix a bug introduced in my previous checkin, where the state was not properlyJohnny Chen1-2/+3
restored after parsing "SBTarget". Indentation matters in Python. :-) llvm-svn: 130532
2011-04-29Add the Python rich comparison methods for SBBreakpoint, where GetID() returnsJohnny Chen1-10/+26
the breakpoint ID and provides the semantics needed for '==' and '!='. And modify LLDBIteratorTestCase.lldb_iter_2() to use '==' between two SBBreakpoint's. llvm-svn: 130531
2011-04-28Fix a typo.Johnny Chen1-1/+1
llvm-svn: 130461
2011-04-28Move the iteration protocol of lldb objects to the auto-generated lldb ↵Johnny Chen1-0/+120
Python module. This is so that the objects which support the iteration protocol are immediately obvious from looking at the lldb.py file. SBTarget supports two types of iterations: module and breakpoint. For an SBTarget instance, you will need to issue either: for m in target.module_iter() or for b in target.breakpoint_iter() For other single iteration protocol objects, just use, for example: for thread in process: ID = thread.GetThreadID() for frame in thread: frame.Disassemble() .... llvm-svn: 130442