summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/target/TestTargetAPI.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update the test scenario for find_global_variables() to now start the ↵Johnny Chen2011-07-111-1/+21
| | | | | | | | | | | | inferior process before issuing API calls to find the global variable and to get its value. rdar://problem/9700873 has been updated to reflect the latest status. The dwarf case now does not seg fault if the inferior is not started; instead, for dwarf case, the value retrieved from the global variable is None. llvm-svn: 134909
* Add assert to check the SBModule of SBSymbolContextList returned from ↵Johnny Chen2011-07-071-0/+1
| | | | | | SBTarget.FindFunctions(). llvm-svn: 134651
* Add test cases to exercise the SBTarget.FindFunctions() API.Johnny Chen2011-07-071-0/+33
| | | | llvm-svn: 134646
* While we are at it, let's also exercise the similar ↵Johnny Chen2011-06-301-7/+21
| | | | | | | | | | SBModule.FindGlobalVariables() API within the find_global_variables() test method. Skipping test_find_global_variables_with_dwarf(self) due to segmentation fault. llvm-svn: 134118
* Add test cases to TestTargetAPI.py to exercise the newly added ↵Johnny Chen2011-06-291-0/+31
| | | | | | SBTarget.FindGlobalVariables() API. llvm-svn: 134109
* The extra burden for the Python API test case to assign its process object ↵Johnny Chen2011-06-151-11/+8
| | | | | | | | | 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
* Now that we have added a post-processing step for adding truth value testing toJohnny Chen2011-05-241-8/+8
| | | | | | | 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
* Make SBBreakpointLocation::GetDescription() API to be consistent with SBTarget,Johnny Chen2011-04-251-1/+4
| | | | | | | | | | i.e., with 'SBStream &description' first, followed by 'DescriptionLevel level'. Modify lldbutil.py so that get_description() for a target or breakpoint location can just take the lldb object itself without specifying an option to mean option lldb.eDescriptionLevelBrief. Modify TestTargetAPI.py to exercise this logic path. llvm-svn: 130147
* Convert the rest of the test suite to use the lldbutil.get_description() ↵Johnny Chen2011-04-231-7/+5
| | | | | | utility function. llvm-svn: 130041
* Add a simple utility function get_description(lldb_obj, option=None) to ↵Johnny Chen2011-04-231-7/+8
| | | | | | | | lldbutil.py and use it from TestTargetAPI.py. llvm-svn: 130038
* Add test cases for the SBTarget.GetDescription() API which takes an extra ↵Johnny Chen2011-04-221-0/+36
| | | | | | lldb::DescriptionLevel enum. llvm-svn: 130029
* Converted to use SBProcess.LaunchSimple().Johnny Chen2011-04-191-2/+1
| | | | llvm-svn: 129795
* Add an extra twist of stopping the inferior in a breakpoint, and then ↵Johnny Chen2011-03-071-2/+16
| | | | | | | | continue till it's done. We should still see the entire stdout redirected once the process is finished. llvm-svn: 127184
* Add test cases for SBTarget.Launch() API with the stdout of the inferior ↵Johnny Chen2011-03-071-0/+39
| | | | | | redirected to a file. llvm-svn: 127179
* Add a test case for the lldb command 'process connect'.Johnny Chen2011-03-041-8/+8
| | | | | | | We start a fake debugserver listening on localhost:12345 and issue the command 'process connect connect://localhost:12345' to connect to it. llvm-svn: 127048
* Add TestDisasmAPI.py which exercises the newly added ↵Johnny Chen2011-03-031-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SBFunction/SBSymbol.GetStartAddress(), among other things: // When stopped on breakppint 1, we can get the line entry using SBFrame API // SBFrame.GetLineEntry(). We'll get the start address for the the line entry // with the SBAddress type, resolve the symbol context using the SBTarget API // SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol. // // We then stop at breakpoint 2, get the SBFrame, and the the SBFunction object. // // The address from calling GetStartAddress() on the symbol and the function // should point to the same address, and we also verify that. And add one utility function disassemble(target, function_or_symbol) to lldbutil.py: """Disassemble the function or symbol given a target. It returns the disassembly content in a string object. """ TestDisasm.py uses the disassemble() function to do disassembly on the SBSymbol, and then the SBFunction object. llvm-svn: 126955
* Add TestTargetAPI.py:Johnny Chen2011-03-031-0/+114
// 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
OpenPOWER on IntegriCloud