- Jul 09, 2013
-
-
Daniel Malea authored
- Test verifies LLDB's handling of inferiors with threads that: hit breakpoints, modfiy variables that have watchpoints set, generate user signals, and crash. - Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py flag. - Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited. - Add sort_stopped_threads helper to lldbutil to separate thread lists based on stop reason. Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed. llvm-svn: 185889
-
- Mar 19, 2013
-
-
Greg Clayton authored
Fixed incorrect python that was trying to validate that we got a valid lldb.SBThread object by checking to see if it is equal to "None". This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes. llvm-svn: 177416
-
- Jan 08, 2013
-
-
rdar://problem/12953853Greg Clayton authored
Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file. Also fixed issues in the test suite that arose after fixing the bug. Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option. llvm-svn: 171816
-
- Sep 24, 2012
-
-
Jim Ingham authored
llvm-svn: 164544
-
- Sep 22, 2012
-
-
Jim Ingham authored
Fix all the test case breakages caused by folks writing tests all over the place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
-
- Jul 06, 2012
-
-
Filipe Cabecinhas authored
llvm-svn: 159832
-
- Feb 04, 2012
-
-
Greg Clayton authored
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
-
- Dec 22, 2011
-
-
Johnny Chen authored
llvm-svn: 147172
-
- Nov 13, 2011
-
-
rdar://problem/10338439Greg Clayton authored
This is the actual fix for the above radar where global variables that weren't initialized were not being shown correctly when leaving the DWARF in the .o files. Global variables that aren't intialized have symbols in the .o files that specify they are undefined and external to the .o file, yet document the size of the variable. This allows the compiler to emit a single copy, but makes it harder for our DWARF in .o files with the executable having a debug map because the symbol for the global in the .o file doesn't exist in a section that we can assign a fixed up linked address to, and also the DWARF contains an invalid address in the "DW_OP_addr" location (always zero). This means that the DWARF is incorrect and actually maps all such global varaibles to the first file address in the .o file which is usually the first function. So we can fix this in either of two ways: make a new fake section in the .o file so that we have a file address in the .o file that we can relink, or fix the the variable as it is created in the .o file DWARF parser and actually give it the file address from the executable. Each variable contains a SymbolContextScope, or a single pointer that helps us to recreate where the variables came from (which module, file, function, etc). This context helps us to resolve any file addresses that might be in the location description of the variable by pointing us to which file the file address comes from, so we can just replace the SymbolContextScope and also fix up the location, which we would have had to do for the other case as well, and update the file address. Now globals display correctly. The above changes made it possible to determine if a variable is a global or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag for each variable (local, global, or static), yet DWARF provides no way for us to classify these variables into these categories. We can now detect when a variable has a simple address expressions as its location and this will help us classify these correctly. While making the above changes I also noticed that we had two symbol types: eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same thing: the symbol is not defined in the current object file. Symbol objects also have a bit that specifies if a symbol is externally visible, so I got rid of the eSymbolTypeExtern symbol type and moved all code locations that used it to use the eSymbolTypeUndefined type. llvm-svn: 144489
-
- Oct 14, 2011
-
-
Johnny Chen authored
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
-
- Sep 30, 2011
-
-
Johnny Chen authored
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
-
- Sep 28, 2011
-
-
Johnny Chen authored
end address is an LLDB_INVALID_ADDRESS. Modify the test case to dump all the symbols in all the sections. llvm-svn: 140710
-
Johnny Chen authored
Add the relevant utility functions to the lldbutil.py file. llvm-svn: 140669
-
- Sep 27, 2011
-
-
Johnny Chen authored
Modify get_description() utility function in lldbutil.py to handle that. llvm-svn: 140638
-
- Aug 04, 2011
-
-
Greg Clayton authored
the SBType implementation classes. Fixed LLDB core and the test suite to not use deprecated SBValue APIs. Added a few new APIs to SBValue: int64_t SBValue::GetValueAsSigned(int64_t fail_value=0); uint64_t SBValue::GetValueAsUnsigned(uint64_t fail_value=0) llvm-svn: 136829
-
- Jul 23, 2011
-
-
Johnny Chen authored
value and the decendents. For an example, rdf = lldbutil.RecursiveDecentFormatter(indent_child=2) print rdf.format(g_table) produces: (const char **[2]) g_table = 0x00000001055a80f0 (location) (const char **) [0] = 0x00000001055a8080 (const char *) *[0] = "Sunday" (const char **) [1] = 0x00000001055a80c0 (const char *) *[1] = "Monday" llvm-svn: 135815
-
- Jul 22, 2011
-
-
Johnny Chen authored
llvm-svn: 135737
-
Johnny Chen authored
which provide some convenient ways to print an SBValue object. Use that in TestValueAPI.py to print the 'days_of_week' char* array variable. For an example: cvf = lldbutil.ChildVisitingFormatter(indent=2) print cvf.format(days_of_week) produces: (const char *[7]) days_of_week = 0x00000001026a5060 (location) (const char *) [0] = "Sunday" (const char *) [1] = "Monday" (const char *) [2] = "Tuesday" (const char *) [3] = "Wednesday" (const char *) [4] = "Thursday" (const char *) [5] = "Friday" (const char *) [6] = "Saturday" llvm-svn: 135736
-
- Jul 14, 2011
-
-
Johnny Chen authored
clang/gcc/llvm-gcc. If the first breakpoint is due to stop at an inlined frame, test that the call site corresponds to where it should be. Also add an expecr for a second break stop, if the first break stop corresponds to an inlined call frame #0. rdar://problem/9741470 llvm-svn: 135100
-
- Jun 20, 2011
-
-
Johnny Chen authored
Add TestInlinedFrame.py to exercise the newly added SBFrame APIs: IsInlined() and GetFunctionName(). llvm-svn: 133404
-
- Jun 17, 2011
-
-
Johnny Chen authored
For the print_stacktrace(thread, string_buffer = False) function, if we have debug info for a frame function, let's also emit the args for the current function. o TestFrameUtils.py: Add stronger assertTrue for frame0's args. o TestPrintStackTraces.py: Launch the inferior with ["abc", "xyz"] and expect '(int)argc=3' in the stack traces, since by design the inferior is built with debug info. llvm-svn: 133204
-
- Jun 16, 2011
-
-
Johnny Chen authored
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
-
- May 26, 2011
-
-
Johnny Chen authored
llvm-svn: 132152
-
- May 25, 2011
-
-
Johnny Chen authored
llvm-svn: 132072
-
- May 13, 2011
-
-
Johnny Chen authored
llvm-svn: 131319
-
Johnny Chen authored
from the frame is not valid, try look for the symbol in the symbol table. llvm-svn: 131273
-
- May 12, 2011
-
-
Johnny Chen authored
o get_parent_frame(frame) o get_args_as_string(frame) to lldbutil.py and create TestFrameUtils.py to exercise the utils. Plus re-arrange the test/python_api/lldbutil to have three directories for testing iteration, process stack traces, and the just added frame utils. llvm-svn: 131213
-
- May 11, 2011
-
-
Johnny Chen authored
llvm-svn: 131168
-
- May 10, 2011
-
-
Johnny Chen authored
Add a utility function get_registers(frame, kind) to get the registers of a given frame and of a given kind. Also add three convenience functions get_GPRs(frame), get_FPRs(frame), and get_ESRs(frame) to get the general purpose registers, the floating point registers, and the exception state registers. Add TestRegistersIterator.py to test these added functions of lldbutil.py. llvm-svn: 131144
-
- May 08, 2011
-
-
Johnny Chen authored
llvm-svn: 131072
-
Johnny Chen authored
of a universal binary and 'rax' register is available when launching the x86_64 slice. rdar://problem/9403437 llvm-svn: 131069
-
- May 05, 2011
-
-
Johnny Chen authored
for thread in process: print >> output, print_stacktrace(thread, string_buffer=True) llvm-svn: 130940
-
- Apr 29, 2011
-
-
Johnny Chen authored
the lldb iteration protocol has been added to lldb.py module. llvm-svn: 130452
-
- Apr 27, 2011
-
-
Johnny Chen authored
method names of all the lldb container objects and returns an iterator object when passed an eligible lldb container object. Example: from lldb_util import smart_iter for thread in smart_iter(process): ID = thread.GetThreadID() if thread.GetStopReason() == lldb.eStopReasonBreakpoint: stopped_due_to_breakpoint = True for frame in smart_iter(thread): self.assertTrue(frame.GetThread().GetThreadID() == ID) ... Add a test case for lldb.smart_iter(). llvm-svn: 130332
-
Johnny Chen authored
And modify the test cases accordingly. llvm-svn: 130314
-
Johnny Chen authored
llvm-svn: 130253
-
Johnny Chen authored
llvm-svn: 130252
-
Johnny Chen authored
llvm-svn: 130251
-
- Apr 26, 2011
-
-
Johnny Chen authored
And modify the test cases accordingly. llvm-svn: 130174
-
Johnny Chen authored
llvm-svn: 130158
-