summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Add support for frameless function compact unwind encodings on x86_64/i386.Jason Molenda2014-12-221-46/+214
| | | | | | | | | | | | This completes the compact unwind support for x86 targets. I'm still skipping the UNWIND_X86_64_MODE_STACK_IND encodings for x86_64 right now because clang was emitting bad data for this form until it was fixed in r217020 circa Sep 2014. arm64 parsing still needs to be added. llvm-svn: 224698
* Various unwinder work. Jason Molenda2014-12-215-121/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are to the FuncUnwinders class -- as we've added more types of unwind information, the way this class was written was making it a mess to maintain. Instead of trying to keep one "non-call site" unwind plan and one "call site" unwind plan, track all the different types of unwind plans we can possibly retrieve for each function and have the call-site/non-call-site accessor methods retrieve those. Add a real "fast unwind plan" for x86_64 / i386 -- when doing an unwind through a function, this only has to read the first 4 bytes to tell if the function has a standard prologue sequence. If so, we can use the architecture default unwind plan to backtrace through this function. If we try to retrieve the save location for other registers later on, a real unwind plan will be used. This one is just for doing fast backtraces. Change the compact unwind plan importer to fill in the valid address range it is valid for. Compact unwind, in theory, may have multiple entries for a single function. The FuncUnwinders rewrite includes the start of supporting this correctly. In practice compact unwind encodings are used for the entire range of the function today -- in fact, sometimes the same encoding is used for multiple functions that have the same unwind rules. But I want to handle a single function that has multiple different compact unwind UnwindPlans eventually. llvm-svn: 224689
* Re-enable compact unwind use on Mac platforms.Jason Molenda2014-12-202-17/+39
| | | | | | | | | When lldb has a binary with protected section contents, don't use the on-disk representation of that compact uwnind -- read it only out of live memory where it has been decrypted. llvm-svn: 224670
* Cleanup some redundant codeEnrico Granata2014-12-201-3/+1
| | | | llvm-svn: 224659
* No need to call SetErrorToErrno when pipe2 succeeds.Oleksiy Vyalov2014-12-191-3/+0
| | | | | | http://reviews.llvm.org/D6743 llvm-svn: 224652
* [TestEvents] Replace expectedFailureLinux with skipIfLinuxSiva Chandra2014-12-191-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: If we do not mark them as skip, they are still executed, which in turn is leading to an assertion failure. The change also adds skipIfLinux to a testlet which was not previously marked with skipIfLinux. This is because running even that test let leads to an assertion failure. Test Plan: dotest.py -C clang -p TestEvents.py Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6715 llvm-svn: 224644
* [TestStaticVariables] Mark the one unmarked test let also expectedFailure.Siva Chandra2014-12-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test is question here is already annotated with @expectedFailureDarwin(9980907). This change also removes an uneccessary (and probably wrong) logic of byssing few asserts if the compiler is not clang or llvm-gcc. Both GCC and Clang emit incomplete debug info. Clang emits this: < 1><0x00000026> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b < 2><0x0000002e> DW_TAG_member DW_AT_name "g_points" DW_AT_type <0x0000003b> DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_external yes(1) DW_AT_declaration yes(1) DW_AT_accessibility DW_ACCESS_public < 1><0x0000003b> DW_TAG_array_type DW_AT_type <0x00000046> < 2><0x00000040> DW_TAG_subrange_type DW_AT_type <0x0000007b> Notice that the DIE at 0x40 does not specify an upperbound. This is with Clang-3.5 and Clang ToT. GCC emits this: < 1><0x000000aa> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b DW_AT_sibling <0x000000c1> < 2><0x000000b4> DW_TAG_member DW_AT_name "g_points" DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_type <0x000000c1> DW_AT_external yes(1) DW_AT_accessibility DW_ACCESS_public DW_AT_declaration yes(1) < 1><0x000000c1> DW_TAG_array_type DW_AT_type <0x0000007e> DW_AT_sibling <0x000000cc> < 2><0x000000ca> DW_TAG_subrange_type The DIE at 0xca is missing attributes. This is with gcc-4.8.2. Test Plan: dotest.py -C clang -P TestStaticVariables.py Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6713 llvm-svn: 224643
* [TestCompletion] Spawn LLDB with '--no-use-colors'.Siva Chandra2014-12-191-1/+2
| | | | | | | | | | | | | | | | | | | Summary: TestCompletion was broken for Ubuntu (and probably for Debian also). The issue was that the lldb prompt in color (which is the default behavior) was confusing pexpect. Test Plan: "http://199.223.233.39:8011/lldb-try-clang-build-clang-test/" Reviewers: zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6671 llvm-svn: 224642
* Don't emit the "WARNING: no locations" message when breakpoints are set inJim Ingham2014-12-191-4/+11
| | | | | | the dummy target. Say they were set in the dummy target instead. llvm-svn: 224606
* Audit uses of ConstString::AsCString() to make sure they weren't assumingJim Ingham2014-12-198-14/+16
| | | | | | | | they would always get a non-NULL string back. <rdar://problem/19298575> llvm-svn: 224602
* Don't generate lldb inline test Makefiles if Makefile already exists.Zachary Turner2014-12-191-2/+5
| | | | | | | Differential Revision: http://reviews.llvm.org/D6664 Reviewed by: Sean Callanan llvm-svn: 224593
* Fixed an issue that could cause GetPointeeData() to fail when passing in a ↵Greg Clayton2014-12-191-5/+34
| | | | | | | | | | non-zero index. The issue was we had a global variable that was a pointer, and the address type of the children wasn't "load address" when it needed to be. Full details are in the comments of the changes. <rdar://problem/15107937> llvm-svn: 224559
* Always use python-based SWIG generation script for CMake.Zachary Turner2014-12-181-8/+7
| | | | | | | | | | | | | | As a first step in addressing Bug #21921 this patch prefers the python-based SWIG generation by default rather than the shell-based SWIG generation any time python is enabled (e.g. LLDB_DISABLE_PYTHON is 0). Additionally, this patch changes the default value of LLDB_DISABLE_PYTHON from 1 to 0 on Windows. Anyone not using the CMake build is unaffected by this patch. llvm-svn: 224543
* Display local kernel version only when non-remote in PlatformLinux.Stephane Sezer2014-12-181-6/+12
| | | | | | | | | | | | | | | | | | | | Summary: This is part of the Linux remote platform work. Displaying the local kernel information when remote debugging doesn't make sense, so we should verify if we are in host mode before doing so. Test Plan: Connect to a remote linux platform mode daemon with `platform select remote-linux` followed by `platform connect ...`, and look at the output of `platform status`. Reviewers: tfiala, clayborg, vharron, compnerd Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D5928 llvm-svn: 224540
* We don't really handle printing embedded NULs in strings, but if we were to, ↵Enrico Granata2014-12-181-0/+6
| | | | | | we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings... llvm-svn: 224537
* Only compile RegisterContextWindows_x86.cpp for x86 host architecture.Zachary Turner2014-12-185-5/+38
| | | | | | | | | | This fixes compilation failures in the 64-bit build of LLDB on Windows. Patch by Aidan Dodds Differential Revision: http://reviews.llvm.org/D6704 llvm-svn: 224528
* Fix a format string warning by noting that StringIsBreakpointNameEric Christopher2014-12-171-2/+0
| | | | | | | will set the error accordingly and so there's no need to set it again. llvm-svn: 224468
* Fix initialization order to match that of the source.Eric Christopher2014-12-171-2/+2
| | | | llvm-svn: 224467
* Provide CreateValueFromData,Expression at the SBTarget level as well as the ↵Enrico Granata2014-12-177-71/+99
| | | | | | SBValue level; and also make all the implenentations agree on using the matching ValueObject::Create instead of doing code copypastas llvm-svn: 224460
* Work around an internal compiler error in MSVC.Zachary Turner2014-12-171-1/+3
| | | | | | | | | | | | For some reason MSVC ICEs when trying to index into a map using a temporary object. Work around this by separating out the call into multiple lines. Patch by Aidan Dodds Differential Revision: http://reviews.llvm.org/D6702 Reviewed by: Zachary Turner, Greg Clayton llvm-svn: 224443
* Enhance the Pipe interface for better portability.Zachary Turner2014-12-1710-266/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes a number of improvements to the Pipe interface. 1) An interface (PipeBase) is provided which exposes pure virtual methods for any implementation of Pipe to override. While not strictly necessary, this helps catch errors where the interfaces are out of sync. 2) All methods return lldb_private::Error instead of returning bool or void. This allows richer error information to be propagated up to LLDB. 3) A new ReadWithTimeout() method is exposed in the base class and implemented on Windows. 4) Support for both named and anonymous pipes is exposed through the base interface and implemented on Windows. For creating a new pipe, both named and anonymous pipes are supported, and for opening an existing pipe, only named pipes are supported. New methods described in points #3 and #4 are stubbed out on posix, but fully implemented on Windows. These should be implemented by someone on the linux / mac / bsd side. Reviewed by: Greg Clayton, Oleksiy Vyalov Differential Revision: http://reviews.llvm.org/D6686 llvm-svn: 224442
* Add the ability to tag one or more breakpoints with a name. TheseJim Ingham2014-12-1616-20/+713
| | | | | | | | | names can then be used in place of breakpoint id's or breakpoint id ranges in all the commands that operate on breakpoints. <rdar://problem/10103959> llvm-svn: 224392
* Improve the performance of the libc++ std::map formatter. This is not the ↵Enrico Granata2014-12-161-87/+57
| | | | | | full solution to the slowness of this formatter, but it's a 5% improvement in our testcase performance, which I am not going to complain too hard about. llvm-svn: 224373
* In C++, it's #include not #importEnrico Granata2014-12-161-1/+1
| | | | llvm-svn: 224352
* Delete MSVC intermediate files on "make clean" from tests.Zachary Turner2014-12-161-1/+3
| | | | | | | | | lld-link shells out to MSVC for certain types of work, and this results in some MSVC output files being generated even though clang / lld are the compiler / linker. This is expected, so we make sure to clean these output files on make clean. llvm-svn: 224345
* Fixed 2 typos in help.Hafiz Abid Qadeer2014-12-161-2/+2
| | | | llvm-svn: 224331
* Temporarily disable CompactUnwindInfo::GetCompactUnwindInfoForFunction.Jason Molenda2014-12-162-0/+13
| | | | | | | | | The compact unwind importer is getting the wrong unwind info for one case that I found. I haven't been able to fix the problem tonight and I don't want to leave TOT behaving incorrectly, so just ignore compact unwind until I can get to the bottom of this. llvm-svn: 224321
* Instead of rolling our own, use the C++11 sanctioned solutionEnrico Granata2014-12-161-13/+6
| | | | llvm-svn: 224310
* If a binary was stripped we sometimes didn't show the ivars of an Objective ↵Greg Clayton2014-12-163-58/+144
| | | | | | | | | | | | | | C class correctly. Now we do as we consult the runtime data for the class so we don't have to have a symbol in the symbol table. Fixed: 1 - try the symbol table symbol for an ObjC ivar and use it if available 2 - fall back to using the runtime data since it is slower to gather via memory read 3 - Fixed our hidden ivars test case to test this to ensure we don't regress 4 - split out a test case in the hidden ivars to cover only the part that was failing so we don't have an expected failure for all of the other content in the test. <rdar://problem/18882687> llvm-svn: 224306
* Now that AddressOf() does sane things with const results, this check is ↵Enrico Granata2014-12-151-4/+0
| | | | | | wrong. Since this is actually quite orthogonal to what this test is all about, actually get rid of the assertions llvm-svn: 224290
* Provide a SBFrame.register/.reg helper on the Python side of SBFrame to vend ↵Enrico Granata2014-12-151-0/+24
| | | | | | | | | | | | | a flattened view of registers Our actual view of registers is a set of register sets, each one of which contains a subset of the actual registers This makes trivial scripting operations tedious ("I just want to read r7!") This helper allows things like: print lldb.frame.reg["r7"] Fixes rdar://19185662 llvm-svn: 224275
* Replace ioctl with select to reduce processor usage by lldb-mi on OSX.Hafiz Abid Qadeer2014-12-155-13/+47
| | | | | | | | | | | | | | | | This saga started with a hang on OSX. 2 solutions were proposed. 1) 'select' based solution works ok on OSX but slows down test completion time on Linux many times. 2) 'ioctl' base solution also works but it causes heavy processor usage on OSX as reported by Ilia K. But as the original hang did not occur on Linux so this commit re-introduces the 'select' in conditional code so that it only runs for OSX. There is no need for this 'fix' to run on Linux. Initial patch by Ilia K <ki.stfu@gmail.com>. A few changes were made by me. llvm-svn: 224258
* Make the platform process connect path less chatty.Stephane Sezer2014-12-132-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If a stream contains an empty string, no need to append it to the output (otherwise we end up with a blank line). Also, no need to print a status message when the state changes to connected, as this string brings no information -- "Process 0" does not mean anything to the user, and the process being connected has no meaning either. Test Plan: Connect to a remote linux platform mode daemon with `platform select remote-linux` followed by `platform connect ...`, create a target and run it, observe the output. Also, run the full test suite (dosep.py). Before: (lldb) [...] connect, etc. (lldb) r Process 0 connected Process 5635 launched: '/Users/sas/Source/test' (x86_64) Process 5635 stopped After: (lldb) [...] connect, etc. (lldb) r Process 5635 launched: '/Users/sas/Source/test' (x86_64) Process 5635 stopped Reviewers: tfiala, vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6593 llvm-svn: 224188
* Move a bunch of method implementations over to the C++ file; remove the need ↵Enrico Granata2014-12-132-86/+112
| | | | | | for a few includes. All in all, good stuff llvm-svn: 224174
* Tests will timeout if they exceed time limit.Vince Harron2014-12-131-11/+63
| | | | | | | | | | | | | | | | Default time limit is 5 minutes. Override the default timeout of 5 minutes with LLDB_TEST_TIMEOUT. LLDB_TEST_TIMEOUT=10m Override the timeout for individual tests with LLDB_[TESTNAME]_TIMEOUT. E.g., LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m Set to "0" to run without timeout. Submitted for Chaoren Lin llvm-svn: 224171
* SyntheticChildrenFrontEnd::* should also be built when python is disabledKeno Fischer2014-12-131-35/+35
| | | | | | | | | | | | | | | | | Summary: This moves - SyntheticChildrenFrontEnd::CreateValueObjectFromExpression - SyntheticChildrenFrontEnd::CreateValueObjectFromAddress - SyntheticChildrenFrontEnd::CreateValueObjectFromData outside the `#ifndef LLDB_DISABLE_PYTHON` since it doesn't seem to depend on python being available and indeed breaks the build when python is disabled. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6646 llvm-svn: 224170
* Some more cleanup of the ValueObjectConstResultImpl code. NFC.Enrico Granata2014-12-124-28/+2
| | | | llvm-svn: 224160
* Fix up this test caseEnrico Granata2014-12-121-9/+9
| | | | llvm-svn: 224157
* Add a test case to validate that AddressOf() and GetLoadAddress() work on a ↵Enrico Granata2014-12-122-0/+43
| | | | | | ValueObjectConstResult. This test passing is the baseline of functionality we want to ensure for our const results llvm-svn: 224151
* The so-called "trivial implementation" has been with us for a few years now. ↵Enrico Granata2014-12-121-34/+0
| | | | | | It's probably safe to assume it works.. so remove the #if stuff llvm-svn: 224147
* Do attempt to ask the impl_backend for the live address of a const result if ↵Enrico Granata2014-12-121-1/+1
| | | | | | none is stored in the object itself; this is for symmetry with GetAddressOf() llvm-svn: 224143
* Do not set the live address of a const result child if its parent has an ↵Enrico Granata2014-12-121-1/+2
| | | | | | invalid live address llvm-svn: 224142
* Add a method to disable the Windows crash / assert dialogs.Zachary Turner2014-12-125-1/+57
| | | | | | | | | | | | | | | | | | When running the test suite on Windows, we can't have Windows popping up dialogs when LLDB crashes in native code because it will hang the test suite. This patch silences those dialogs by checking an environment variable at startup and configuring Windows based on its value. This patch also adds an environment variable to force inferiors to never spawn in their own console window. This is useful to prevent new window spawm when running the test suite. Reviewed by: Scott Graham Differential Revision: http://reviews.llvm.org/D6628 llvm-svn: 224137
* Make sure if a thread specifies a 'register_data_addr' in a python operating ↵Greg Clayton2014-12-111-1/+1
| | | | | | system plug-in, that is is used to fetch the register values. llvm-svn: 224083
* Make sure we print errors for python OperatingSystem plug-ins for when ↵Greg Clayton2014-12-111-0/+12
| | | | | | things go wrong. We also dump the dictionary or collection that had errors so the user can see which info was wrong. llvm-svn: 224082
* Removed the assertion that we can find any namedSean Callanan2014-12-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Objective-C type in the runtime. This is not actually true, it's entirely possible to say @class DoesntExist; @interface DoesExist { DoesntExist *whyyyyy; } @end and this code will not only compile but also run. So this assertion will fire in situations users might encounter. I left the assertion enabled in debug mode, because we could still catch a case we're not aware of (i.e., a class that we *ought* to have found but where somehow we mis-parsed the name). <rdar://problem/19151914> llvm-svn: 224038
* Disable the remaining ProcessIO test on Windows.Zachary Turner2014-12-101-1/+1
| | | | | | | This still relies on PutSTDIN, just indirectly. So it was hanging due to not being able to get stdin from the test. llvm-svn: 223983
* Fix some test failures for Windows.Zachary Turner2014-12-104-7/+53
| | | | llvm-svn: 223982
* Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.Eric Christopher2014-12-103-36/+36
| | | | llvm-svn: 223973
* Silence -Winconsistent-missing-override warnings.Eric Christopher2014-12-103-70/+70
| | | | llvm-svn: 223972
OpenPOWER on IntegriCloud