summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
Commit message (Collapse)AuthorAgeFilesLines
...
* rdar://problem/10216227Johnny Chen2011-12-231-0/+8
| | | | | | | | | LLDB (python bindings) Crashing in lldb::SBDebugger::DeleteTarget(lldb::SBTarget&) Need to check the validity of (SBTarget&)target passed to SBDebugger::DeleteTarget() before calling target->Destroy(). llvm-svn: 147213
* Fix wrong test method name.Johnny Chen2011-12-211-1/+1
| | | | llvm-svn: 147072
* Work in progress for:Johnny Chen2011-12-201-0/+4
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add a NULL check for SBValue.CreateValueFromExpression(). llvm-svn: 146954
* Work in progress for:Johnny Chen2011-12-201-0/+7
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add a NULL check for SBTarget.AttachToProcessWithName() so it will not hang. llvm-svn: 146948
* Add fuzz call to SBStringList.AppendString(None). LLDB should not crash.Johnny Chen2011-12-201-0/+1
| | | | llvm-svn: 146935
* Add test_frame_api_boundary_condition() test case to exercise a bunch of ↵Johnny Chen2011-12-191-0/+42
| | | | | | boundary condition inputs. llvm-svn: 146924
* Add a test sequence which passes None to lldb.SBFileSpec(). LLDB should not ↵Johnny Chen2011-12-191-0/+6
| | | | | | crash. llvm-svn: 146922
* Tes passing None to SetErrorString() and SetErrorStringWithFormat().Johnny Chen2011-12-191-0/+2
| | | | llvm-svn: 146919
* Work in progress for:Johnny Chen2011-12-191-0/+30
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add NULL checks for SBDebugger APIs. llvm-svn: 146917
* Add a fuzz call for SBCommunication: obj.connect(None).Johnny Chen2011-12-191-0/+1
| | | | llvm-svn: 146912
* Work in progress for:Johnny Chen2011-12-191-0/+4
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add NULL checks for SBCommandReturnObject.AppendMessage(). llvm-svn: 146911
* Work in progress for:Johnny Chen2011-12-191-0/+6
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add NULL checks for SBCommandInterpreter APIs. llvm-svn: 146909
* Work in progress for:Johnny Chen2011-12-191-0/+43
| | | | | | | | | rdar://problem/10577182 Audit lldb API impl for places where we need to perform a NULL check Add NULL checks for SBModule and SBSection APIs. llvm-svn: 146899
* Fix Python docstring for SBThread.GetStopDescription().Johnny Chen2011-12-191-1/+1
| | | | llvm-svn: 146890
* Simplify the setup leading to the testing of ReadMemory(), ↵Johnny Chen2011-12-161-25/+7
| | | | | | | | | ReadCStringFromMemory(), and ReadUnsignedFromMemory(). Instead of getting the location of the variable and converting the hex string to an int, just use val.AddressOf().GetValueAsUnsigned() to compute the address of the memory region to read from. llvm-svn: 146719
* Add a test sequence of SBProcess.ReadCStringFromMemory() with (char ↵Johnny Chen2011-12-162-0/+14
| | | | | | | | *)my_char_ptr as the address to read from. char *my_char_ptr = (char *)"Does it work?"; llvm-svn: 146716
* Add test scenario for newly added SBProcess APIs: ReadCStringFromMemory() ↵Johnny Chen2011-12-152-0/+48
| | | | | | and ReadUnsignedFromMemory(). llvm-svn: 146704
* Add fuzz call for newly added method SBTarget.GetInstructions().Johnny Chen2011-12-151-0/+1
| | | | llvm-svn: 146696
* Add fuzz calls for newly added SBProcess methods. Fix a typo in the audodoc ↵Johnny Chen2011-12-151-0/+3
| | | | | | of SBProcess.ReadCStringFromMemory(). llvm-svn: 146695
* Move disassemble-raw-data dir to reside under test/python_api where they belong.Johnny Chen2011-12-151-0/+45
| | | | | | Add debug statements for the raw bytes and the disassembled instruction. llvm-svn: 146676
* http://llvm.org/bugs/show_bug.cgi?id=11579Johnny Chen2011-12-151-0/+5
| | | | | | | | | lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds SBValue::CreateValueFromAddress() should check the validity of type and its derived pointer type before using it. Add a test case. llvm-svn: 146629
* http://llvm.org/bugs/show_bug.cgi?id=11560 lldb::SBTarget::FindFirstType ↵Johnny Chen2011-12-142-0/+5
| | | | | | | | crashes when passed None Add null checks to several functions. Plus add test scenario for passing None to SBTarget.FindFirstType(None) and friends. llvm-svn: 146540
* SBProcess.PutSTDIN() needs to be properly typemapped when swigging,Johnny Chen2011-11-284-1/+85
| | | | | | | | | | | | | | | | | so that we can do Python scripting like this: target = self.dbg.CreateTarget(self.exe) self.dbg.SetAsync(True) process = target.LaunchSimple(None, None, os.getcwd()) process.PutSTDIN("Line 1 Entered.\n") process.PutSTDIN("Line 2 Entered.\n") process.PutSTDIN("Line 3 Entered.\n") Add TestProcessIO.py to exercise the process IO API: PutSTDIN()/GetSTDOUT()/GetSTDERR(). llvm-svn: 145282
* While we are at it, verify that 'my_int_ptr' points to 'g_my_int', using the ↵Johnny Chen2011-11-151-0/+6
| | | | | | | | SBTarget.ResolveLoadAddress() to get its SBAddress, and SBAddress.GetSymbol() to get the corresponding symbol. llvm-svn: 144728
* Add test scenario for value.GetChildAtIndex(0) where value is a pointer to a ↵Johnny Chen2011-11-152-0/+12
| | | | | | simple type. llvm-svn: 144697
* File renaming.Johnny Chen2011-11-151-0/+0
| | | | llvm-svn: 144693
* Add test cases for setting condition on a watchpoint for both command and API.Johnny Chen2011-10-174-0/+136
| | | | llvm-svn: 142291
* Add SBWatchpoint::GetError() API, which is not currently populated as yet.Johnny Chen2011-10-141-0/+2
| | | | llvm-svn: 141979
* Remove debug 'print watchpoint' statement.Johnny Chen2011-10-141-1/+0
| | | | llvm-svn: 141965
* Add a test case to exercise the newly added SB API:Johnny Chen2011-10-142-2/+105
| | | | | | | lldb::SBWatchpoint SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write) llvm-svn: 141931
* Fix wrong docstring with respect to API usage.Johnny Chen2011-10-141-5/+5
| | | | llvm-svn: 141928
* SBValue::Watch() and SBValue::WatchPointee() are now the official API for ↵Johnny Chen2011-10-149-85/+104
| | | | | | | | | | | | | | | | | | creating a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee encapsulated by SBValue (WatchPointee). Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that. Modified the watchpoint related test suite to reflect the change. Plus replacing WatchpointLocation with Watchpoint throughout the code base. There are still cleanups to be dome. This patch passes the whole test suite. Check it in so that we aggressively catch regressions. llvm-svn: 141925
* Remove test logic to check for clang and skip the rest due to insufficient ↵Johnny Chen2011-10-101-2/+0
| | | | | | | | debug info. Recent changes in lldb inlining robustness seem to have fixed it. llvm-svn: 141595
* Add fuzz call for SBBreakpointLocation.GetAddress().Johnny Chen2011-10-071-0/+1
| | | | llvm-svn: 141443
* Move the responsibility for translating the various eFunctionNameType ↵Jim Ingham2011-10-071-0/+3
| | | | | | | | | | lookups to the SymbolFIle (it was done mostly in the BreakpointResolverName resolver before.) Then tailor our searches to the way the indexed maps are laid out. This removes a bunch of test case failures using indexed dSYM's. llvm-svn: 141428
* Add capability to set ignore count for watchpoint on the command line:Johnny Chen2011-10-051-0/+102
| | | | | | | | watchpoint ignore -i <count> [<watchpt-id | watchpt-id-list>] Add tests of watchpoint ignore_count for command line as well as API. llvm-svn: 141217
* Add fuzz call for sub-section iteration for SBSection.Johnny Chen2011-10-031-0/+2
| | | | llvm-svn: 141041
* Add SBSection API to the fuzz testing.Johnny Chen2011-10-032-0/+30
| | | | llvm-svn: 141039
* Add fuzz call for watchpoint location iterator, too.Johnny Chen2011-10-031-0/+2
| | | | llvm-svn: 141036
* Add fuzz calls for various iterators, too.Johnny Chen2011-10-0312-1/+31
| | | | llvm-svn: 141035
* Add SBFrame.WatchLocation() to find and watch the location pointed to byJohnny Chen2011-10-014-1/+193
| | | | | | | | | a variable usng the frame as the scope. Add TestSetWatchpoint.py to exercise this API. Also fix some SWIG Python docstrings. llvm-svn: 140914
* Fix extraneous import as a result of the last change.Johnny Chen2011-09-301-1/+1
| | | | llvm-svn: 140832
* Migrate the in_range(symbol, section) and symbol_iter(module, section) ↵Johnny Chen2011-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | utility functions from lldbutil.py to the lldb.py proper. The in_range() function becomes a function in the lldb module. And the symbol_iter() function becomes a method within the SBModule called symbol_in_section_iter(). Example: # Iterates the text section and prints each symbols within each sub-section. for subsec in text_sec: print INDENT + repr(subsec) for sym in exe_module.symbol_in_section_iter(subsec): print INDENT2 + repr(sym) print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType()) might produce this following output: [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870) symbol type: code id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0) symbol type: code id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c) symbol type: code id = {0x00000023}, name = 'start', address = 0x0000000100001780 symbol type: code [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62) symbol type: trampoline id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68) symbol type: trampoline id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e) symbol type: trampoline id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74) symbol type: trampoline id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a) symbol type: trampoline id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80) symbol type: trampoline id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86) symbol type: trampoline id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c) symbol type: trampoline id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92) symbol type: trampoline id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98) symbol type: trampoline id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e) symbol type: trampoline id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4) symbol type: trampoline [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame llvm-svn: 140830
* Modify lldbutil.in_range(symbol, section) to deal with the symbol whoseJohnny Chen2011-09-281-2/+6
| | | | | | | end address is an LLDB_INVALID_ADDRESS. Modify the test case to dump all the symbols in all the sections. llvm-svn: 140710
* Add a test sequence of iterating through a module's symbols belonging to a ↵Johnny Chen2011-09-281-0/+6
| | | | | | | | section. Add the relevant utility functions to the lldbutil.py file. llvm-svn: 140669
* Add a simple test TestModuleAndSection.py to exercise some ↵Johnny Chen2011-09-273-0/+188
| | | | | | | | | module/section-related APIs. In particular, it iterates through the executable module's SBSections, looking for the '__TEXT' section and further iterates on its subsections (of SBSection type, too). llvm-svn: 140654
* Make the assignment of TestBase.mydir more portable.Johnny Chen2011-09-273-3/+3
| | | | llvm-svn: 140640
* SBWatchpointLocation.GetDescription() takes an additional description level arg.Johnny Chen2011-09-271-0/+3
| | | | | | Modify get_description() utility function in lldbutil.py to handle that. llvm-svn: 140638
* Add SBTarget::GetLastCreatedWatchpointLocation() API and export to the ↵Johnny Chen2011-09-272-1/+11
| | | | | | | | | | | Python interface. Also add rich comparison methods (__eq__ and __ne__) for SBWatchpointLocation. Modify TestWatchpointLocationIter.py to exercise the new APIs. Add fuzz testings for the recently added SBTarget APIs related to watchpoint manipulations. llvm-svn: 140633
* Add fuzz testing for newly added SBWatchpointLocation API.Johnny Chen2011-09-272-0/+28
| | | | llvm-svn: 140632
OpenPOWER on IntegriCloud