- Mar 23, 2011
-
-
Johnny Chen authored
rdar://problem/9173060 lldb hangs while running unique-types disappears if running with clang version >= 3. Modify the TestUniqueTypes.py to detect if we are running with clang version < 3 and, if true, skip the test. Update the lldbtest.system() function to return a tuple of (stdoutdata, stderrdata) since we need the stderr data from "clang -v" command. Modify existing clients of lldbtest.system() to now use, for example: # First, capture the golden output emitted by the oracle, i.e., the # series of printf statements. - go = system("./a.out", sender=self) + go = system("./a.out", sender=self)[0] # This golden list contains a list of (variable, value) pairs extracted # from the golden output. gl = [] And add two utility functions to lldbutil.py. llvm-svn: 128162
-
- Mar 10, 2011
-
-
Johnny Chen authored
Add test cases for Python SBThread.StepOut() API by stepping out of a malloc call where the call site is at function b(). Verifies that after the thread.StepOut(), we are at the correct line within function b. llvm-svn: 127374
-
- Mar 05, 2011
-
-
Johnny Chen authored
API with a process not in eStateConnected, and checks that the remote launch failed. Modify SBProcess::RemoteLaunch()/RemoteAttachToProcessWithID()'s log statements to fix a crasher when logging is turned on. llvm-svn: 127055
-
- Mar 03, 2011
-
-
Johnny Chen authored
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
-
Johnny Chen authored
// 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
-
- Mar 02, 2011
-
-
Johnny Chen authored
llvm-svn: 126877
-
Johnny Chen authored
o int_to_bytearray() o bytearray_to_int() They return/interpret the bytearray in the little endian format. For big endian, simply perform ba.reverse() on the bytearray object. And modify TestProcessAPI.py to take advantage of the functions. llvm-svn: 126813
-
- Dec 08, 2010
-
-
Johnny Chen authored
way of iterating through an aggregate data structure. The added example usage is from an actual use in test/foundation/TestSymbolTable.py: 2. Pass a container of aggregate which provides APIs to get to the size and the element of the aggregate: # Module is a container of symbol table module = target.FindModule(filespec) for symbol in lldb_iter(module, 'GetNumSymbols', 'GetSymbolAtIndex'): name = symbol.GetName() ... llvm-svn: 121271
-
- Nov 03, 2010
-
-
Johnny Chen authored
local variable and an argument variable. Add ValueTypeString() utility function into lldbutil.py which converts the enum into a human readable string. Modify TestBase.DebugSBValue() to also dump the value type of an SBValue object. llvm-svn: 118197
-
- Oct 25, 2010
-
-
Johnny Chen authored
llvm-svn: 117287
-
Johnny Chen authored
llvm-svn: 117281
-
- Oct 22, 2010
-
-
Johnny Chen authored
llvm-svn: 117152
-
- Oct 18, 2010
-
-
Johnny Chen authored
Also change the utility functions in lldbutil.py, too, to correspond to the StateType representation change. llvm-svn: 116706
-
- Oct 16, 2010
-
-
Johnny Chen authored
llvm-svn: 116643
-
- Oct 15, 2010
-
-
Johnny Chen authored
llvm-svn: 116621
-
Johnny Chen authored
session info after a test case failure, allowing more direct inspection of debugger session which leads to the test failure. For a simple usage scenario: [18:06:26] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log ... [18:14:43] johnny:/Volumes/data/lldb/svn/trunk/test $ ls -l .session-* -rw-r--r-- 1 johnny admin 1359 Oct 14 18:06 .session-TestArrayTypes.ArrayTypesTestCase.test_with_dwarf_and_run_command -rw-r--r-- 1 johnny admin 2054 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dsym_and_expr_parser -rw-r--r-- 1 johnny admin 2055 Oct 14 18:07 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_expr_parser -rw-r--r-- 1 johnny admin 1351 Oct 14 17:57 .session-TestClassTypes.ClassTypesTestCase.test_with_dwarf_and_run_command [18:14:51] johnny:/Volumes/data/lldb/svn/trunk/test $ The test case which failed will have its recorded session info dumped to a .session-* file in the current working directory. For test suite using relocated directory, expect to find the .session-* files there. In this checkin, I also add @skip decorator to the two test methods in test/foundation/TestObjCMethods.py as it looks like the test suite is deadlocking when running the tests. More investigations are needed. llvm-svn: 116552
-
- Oct 10, 2010
-
-
Johnny Chen authored
with the function name 'lldb_iter'. Example: def disassemble_instructions (insts): from lldbutil import lldb_iter for i in lldb_iter(insts, 'GetSize', 'GetInstructionAtIndex'): print i llvm-svn: 116171
-
- Oct 09, 2010
-
-
Johnny Chen authored
structures into an iterable Python object. Example: def disassemble_instructions (insts): from lldbutil import Iterator for i in Iterator(insts, 'GetSize', 'GetInstructionAtIndex'): print i llvm-svn: 116137
-
- Oct 08, 2010
-
-
Johnny Chen authored
update the affected API clients. llvm-svn: 115995
-
- Oct 07, 2010
-
-
Johnny Chen authored
the threads and print their stack traces when stopped on a breakpoint. Add a PrintStackTraces(process) utility function into the lldbutil.py module. llvm-svn: 115983
-
Johnny Chen authored
PrintStackTrace(thread) function. If string_buffer is True, PrintStackTrace() will return the content of the stack trace as a string, instead. llvm-svn: 115960
-
- Sep 09, 2010
-
-
Johnny Chen authored
llvm-svn: 113460
-
Johnny Chen authored
from scripting applications. An example usage from TestConditionalBreak.py is: import lldbutil lldbutil.PrintStackTrace(thread) ./dotest.py -v conditional_break ---------------------------------------------------------------------- Collected 2 tests test_with_dsym (TestConditionalBreak.ConditionalBreakTestCase) Exercise some thread and frame APIs to break if c() is called by a(). ... Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`a at main.c:25 frame #3: a.out`main at main.c:44 frame #4: a.out`start Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`main at main.c:47 frame #3: a.out`start Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`a at main.c:27 frame #2: a.out`main at main.c:50 frame #3: a.out`start ok test_with_dwarf (TestConditionalBreak.ConditionalBreakTestCase) Exercise some thread and frame APIs to break if c() is called by a(). ... Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`a at main.c:25 frame #3: a.out`main at main.c:44 frame #4: a.out`start Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`b at main.c:34 frame #2: a.out`main at main.c:47 frame #3: a.out`start Stack trace for thread id=0x2e03 name=None queue=com.apple.main-thread: frame #0: a.out`c at main.c:39 frame #1: a.out`a at main.c:27 frame #2: a.out`main at main.c:50 frame #3: a.out`start ok ---------------------------------------------------------------------- Ran 2 tests in 7.803s OK llvm-svn: 113432
-