summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [DataFormatter] Remove dead code for the NSDictionary formatter.Davide Italiano2018-03-131-10/+0
| | | | | | | I'm going to make changes in this area soon, so I figured I could clean things a bit while I was around. llvm-svn: 327445
* include locale.h in IOHandler.cppPavel Labath2018-03-131-0/+1
| | | | | | | This is needed for the setlocale() call, and it seems that it is not transitively pulled in for some build configurations. llvm-svn: 327413
* Fix clang-3.8 buildPavel Labath2018-03-131-1/+1
| | | | | | | | clang-3.8 complains that constructor for '...' must explicitly initialize the const member. Newer clangs and gcc seem to be fine with this, but explicitly initializing the member does not hurt. llvm-svn: 327380
* Fix linux s390x build (pr36694)Pavel Labath2018-03-131-1/+1
| | | | llvm-svn: 327379
* [ExpressionParser] Fix crash when evaluating invalid expresssions.Davide Italiano2018-03-133-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Typical example, illformed comparisons (operator== where LHS and RHS are not compatible). If a symbol matched `operator==` in any of the object files lldb inserted a generic function declaration in the ASTContext on which Sema operates. Maintaining the AST context invariants is fairly tricky and sometimes resulted in crashes inside clang (or assertions hit). The real reason why this feature exists in the first place is that of allowing users to do something like: (lldb) call printf("patatino") even if the debug informations for printf() is not available. Eventually, we might reconsider this feature in its entirety, but for now we can't remove it as it would break a bunch of users. Instead, try to limit it to non-C++ symbols, where getting the invariants right is hopefully easier. Now you can't do in lldb anymore (lldb) call _Zsomethingsomething(1,2,3) but that doesn't seem to be such a big loss. <rdar://problem/35645893> llvm-svn: 327356
* [lit] `llvm-mc` is now a dependency to run tests.Davide Italiano2018-03-121-0/+1
| | | | llvm-svn: 327350
* Re-add change for https://reviews.llvm.org/D42582 with added directories.Jim Ingham2018-03-1214-3/+281
| | | | llvm-svn: 327331
* Introduce a setting to disable Spotlight while running the test suiteAdrian Prantl2018-03-126-4/+31
| | | | | | | | | | | This is a more principled approach to disabling Spotlight .dSYM lookups while running the testsuite, most importantly it also works for the LIT-based tests, which I overlooked in my initial fix (renaming the test build dir to lldb-tests.noindex). Differential Revision: https://reviews.llvm.org/D44342 llvm-svn: 327330
* Revert "Improve prologue handling to support functions with multiple entry ↵Vedant Kumar2018-03-129-82/+3
| | | | | | | | | | | | | | | points." This reverts commit r327318. It breaks the Xcode and CMake Darwin builders: clang: error: no such file or directory: '.../source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp' clang: error: no input files More details are in https://reviews.llvm.org/D42582. llvm-svn: 327327
* Improve prologue handling to support functions with multiple entry points.Jim Ingham2018-03-129-3/+82
| | | | | | | | https://reviews.llvm.org/D42582 Patch from Leandro Lupori. llvm-svn: 327318
* [lldb] Unbreak lldb builds due to r327219Mandeep Singh Grang2018-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 adds wrappers to sort which shuffle the container before sorting. This causes lldb bots to break as the call to sort is now ambiguous: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/20725/steps/ninja%20build%20local/logs/stdio So we need use llvm::sort instead of sort to avoid ambiguity with std::sort. Note: This patch is just to unbreak the bots. I plan to have subsequent patches which will convert all calls to std::sort to llvm::sort. Reviewers: RKSimon, k8stone, jingham, labath, zturner Subscribers: andreadb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D44354 llvm-svn: 327224
* Rename clang.modules-cache-path to symbols.clang-modules-cache-pathAdrian Prantl2018-03-104-6/+6
| | | | | | | | I want to extend the properties on ModuleList to also contain other more general settings and renaming the settings category to symbols seems to be the least bad of choices. llvm-svn: 327193
* [SymbolFilePDB] Keep searching until the file name is found for the pdb ↵Aaron Smith2018-03-091-2/+3
| | | | | | | | | | | | | | compiland Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44182 llvm-svn: 327162
* Make TestCompletion work on windowsPavel Labath2018-03-091-58/+0
| | | | | | | | | | | The test I added in r327110 is failing on windows because of "import pexpect". However, this import is no longer necessary as these tests don't use pexpect anymore. In fact, it seems that all TestCompletion tests are passing on windows after this, so I enable all of them. llvm-svn: 327133
* [elf] Remove one copy of the section merging codePavel Labath2018-03-092-32/+46
| | | | | | | | | | | | | | | | Summary: Besides being superfluous, this double merging was actually wrong and causing some sections to be added twice. The reason for that was that the code assumes section IDs are unique in the section list, but this is only true if all sections in the list come from the same object file. Reviewers: fjricci, jankratochvil Subscribers: emaste, lldb-commits, arichardson Differential Revision: https://reviews.llvm.org/D44157 llvm-svn: 327123
* Move option parsing out of the Args classPavel Labath2018-03-099-713/+612
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The args class is used in plenty of places (a lot of them in the lower lldb layers) for representing a list of arguments, and most of these places don't care about option parsing. Moving the option parsing out of the class removes the largest external dependency (there are a couple more, but these are in static functions), and brings us closer to being able to move it to the Utility module). The new home for these functions is the Options class, which was already used as an argument to the parse calls, so this just inverts the dependency between the two. The functions are themselves are mainly just copied -- the biggest functional change I've made to them is to avoid modifying the input Args argument (getopt likes to permute the argument vector), as it was weird to have another class reorder the entries in Args class. So now the functions don't modify the input arguments, and (for those where it makes sense) return a new Args vector instead. I've also made the addition of a "fake arg0" (required for getopt compatibility) an implementation detail rather than a part of interface. While doing that I noticed that ParseForCompletion function was recording the option indexes in the shuffled vector, but then the consumer was looking up the entries in the unshuffled one. This manifested itself as us not being able to complete "watchpoint set variable foo --" (because getopt would move "foo" to the end). Surprisingly all other completions (e.g. "watchpoint set variable foo --w") were not affected by this. However, I couldn't find a comprehensive test for command argument completion, so I consolidated the existing tests and added a bunch of new ones. Reviewers: davide, jingham, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43837 llvm-svn: 327110
* I added CFLAGS etc to one part of the project file I should not have.Jason Molenda2018-03-091-49/+1
| | | | llvm-svn: 327097
* More cleanups of debugserver project file and the libpmenergy/libpmsampleJason Molenda2018-03-091-67/+132
| | | | | | | | stuff. Activate it when an internal SDK is selected. Update the name of the LDFLAGS to match the rest of the settings. Update the default arch for ios builds. llvm-svn: 327095
* [test] Skip a test which sporadically fails in its dsym variantVedant Kumar2018-03-091-0/+2
| | | | | | | | There is a mailing list discussion re: r325927 about why this test fails in the dsym variant. I've marked it skipped for now, until the issue is resolved. llvm-svn: 327089
* Remove unneeded per-arch sdk specifications from debugserver xcode project file.Jason Molenda2018-03-091-42/+0
| | | | llvm-svn: 327088
* Remove the explicit dependency on libpmenergy and libpmsample.Jason Molenda2018-03-091-6/+2
| | | | llvm-svn: 327087
* Fixed two more sdk inconsistencies with the pmenergy stuff.Jason Molenda2018-03-091-5/+3
| | | | llvm-svn: 327085
* Three little cleanups in the debugserver xcode project file.Jason Molenda2018-03-091-103/+32
| | | | | | | | | | | | | | | | | 1. Link against libpmenergy and pmsample unconditionally. It is available on macOS 10.10 ("Yosemite") and newer. We're already linking against libcompression unconditionally which is only available on macOS 10.11 & newer. 2. Change a few "sdk=macosx.internal"'s to sdk=macosx. 3. Clean up a few places where libcompression was being enabled inconsistently. Note: the -DLLDB_ENERGY define is only set when building against the macosx.internal SDK; it includes a header file that is not public. We link against the dylibs unconditionally for simplicity. llvm-svn: 327084
* [test] Skip a test when using an out-of-tree debugserverVedant Kumar2018-03-086-0/+22
| | | | | | | | | | | | | | | | | | | | The test "test_fp_special_purpose_register_read" in TestRegisters.py fails on Darwin machines configured to use an out-of-tree debugserver. The error message is: 'register read ftag' returns expected result, got 'ftag = 0x80'. This indicates that the debugserver in use is too old. This commit introduces a decorator which can be used to skip tests which rely on having a just-built debugserver. This resolves the issue: $ ./bin/llvm-dotest -p TestRegisters.py -v 1 out of 617 test suites processed - TestRegisters.py Test Methods: 7 Success: 6 Skip: 1 ... llvm-svn: 327052
* Fix std unique pointer pretty-printer for new stl versionsPavel Labath2018-03-081-4/+23
| | | | | | | | | | | | | | | Summary: The unique pointer layout was changed in libstdc++ 6.0.23. Reviewers: labath, clayborg Reviewed By: labath, clayborg Subscribers: luporl, lbianc, lldb-commits Differential Revision: https://reviews.llvm.org/D44015 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>. llvm-svn: 327017
* Install lldb's SB headers (pr36630)Pavel Labath2018-03-081-6/+10
| | | | | | | | | | | These were removed in r309021 in what looks like an accidentally committed change. This brings them back. I also rename the header component to lldb-headers (instead of lldb_headers) to match the llvm style and add a special install-lldb-headers target, which installs just the headers. llvm-svn: 327016
* [LLDB][PPC64] Fix single step and LldbGdbServer testsPavel Labath2018-03-083-6/+11
| | | | | | | | | | | | | | | | | | Summary: On PPC64, the tested functions were being entered through their local entry point, while the tests expected the program to stop at the function start address, that, for PPC64, corresponds to the global entry point. To fix the issue, the test program was modified to call the functions to be tested through function pointers, which, on PPC64, force the calls through the global entry point, while not affecting the test on other platforms. Reviewers: clayborg, labath Reviewed By: labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43768 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 327013
* [lldbtestsuite] llvm-objcopy is now required to run the lit tests.Davide Italiano2018-03-071-0/+1
| | | | | | | | | | | There's now a test using llvm-objcopy in lit/. This doesn't fail on the bot(s) because `llvm-objcopy` is probably already available there, but if you get a fresh checkout and run `ninja check-lldb` you'll observe the failure as it's not tracking the dependency correctly. This fixes the problem on my machine, and probably everywhere else. llvm-svn: 326919
* [SymbolFilePDB] Add missing Char16 and Char32 types in a few placesAaron Smith2018-03-073-0/+18
| | | | | | | | | | Reviewers: zturner, rnk, lldb-commits Subscribers: clayborg, llvm-commits Differential Revision: https://reviews.llvm.org/D44166 llvm-svn: 326875
* [SymbolFilePDB] Minor cleanupAaron Smith2018-03-071-22/+23
| | | | | | | | | | | | | | | | | | | Summary: - Remove unused code - Adding `break` statement conditionally - Ignore empty strings in FindTypeByName Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44165 llvm-svn: 326870
* [SymbolFilePDB] Add support for CVR pointer type qualifierAaron Smith2018-03-073-20/+129
| | | | | | | | | | | | | | | | | Summary: - Complete element type of PDBSymbolTypeArray. - Add a test to check types of multi-dimensional array and pointers with CVR. Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44167 llvm-svn: 326859
* [SymbolFilePDB] Get line number for PDBSymbolTypeEnumAaron Smith2018-03-072-14/+18
| | | | | | | | | | | | Reviewers: zturner, lldb-commits, rnk Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44164 llvm-svn: 326858
* the thread id is easier to read in base16.Jason Molenda2018-03-061-1/+1
| | | | llvm-svn: 326849
* Add test for lldb-mi interpreterAdrian Prantl2018-03-062-0/+39
| | | | | | | | | | Test that "lldb-mi --interpreter" can interpret "target list" CLI command. Patch by Alex Polyakov! Differential Revision: https://reviews.llvm.org/D44040 llvm-svn: 326847
* Rewrite TestTargetSymbolsBuildidCase to be more focusedPavel Labath2018-03-065-46/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was failing in remote debugging scenario with windows as a host as cmd.exe is not able to parse the complicated shell commands in the Makefile. The test seemed like a perfect candidate for a more focused testing approach, so I have rewritten in on top of lldb-test's module-sections functionality. The slight gotcha there was that the Module::GetSectionList does not include the sections from the symbol file until someone manually calls Module::GetSymbolVendor. Normally, this is not an issue, because someone will have initialized the symbol vendor by the time anyone starts looking at the sections. However, when all one this is dump the section list, we run into this problem. I've tried making this behavior more automatic, but it turns out it's not that easy, so for now, I just manually initialize the Symbol Vendor before dumping out the sections in lldb-test. Reviewers: jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42914 llvm-svn: 326805
* ObjectFileMachO: split CreateSections mega-function into more manageable chunksPavel Labath2018-03-062-508/+517
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In an effort to understand the function's operation, I've split it into logical pieces. Parsing of a single segment is moved to a separate function (and the parsing state that is carried from one segment to another is explicitly captured in the SegmentParsingContext object). I've also extracted some pieces of code which were already standalone (validation of the segment load command, determining the section type, determining segment permissions) into separate functions. Parsing of a single section within the segment should probably also be a separate function, but I've left that for a separate patch. This patch is intended to be NFC. Reviewers: clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D44074 llvm-svn: 326791
* HostThreadPosix::Cancel: remove android-specific implementationPavel Labath2018-03-061-4/+1
| | | | | | | Noone is calling this function on android, so we can just use the generic llvm_unreachable "implementation". llvm-svn: 326777
* [LLDB][PPC64] Fixed issues with expedited registersPavel Labath2018-03-062-0/+6
| | | | | | | | | | | | | | | | | Summary: - reg_nums were missing the end marker entry - marked FP test to be skipped for ppc64 Reviewers: labath, clayborg Reviewed By: labath, clayborg Subscribers: alexandreyy, lbianc, nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D43767 Patch by Leandro Lupori <leandro.lupori@gmail.com> llvm-svn: 326775
* Upstreaming avx512 register support in debugserver. These changesJason Molenda2018-03-0614-53/+1460
| | | | | | | | | | | | | | | | | | | were originally written by Chris Bieneman, they've undergone a number of changes since then. Also including the debugserver bridgeos support, another arm environment that runs Darwin akin to ios. These codepaths are activated when running in a bridgeos environment which we're not set up to test today. There's additional (small) lldb changes to handle bridgeos binaries that still need to be merged up. Tested on a darwin system with avx512 hardware and without. <rdar://problem/36424951> llvm-svn: 326756
* LLDBStandalone.cmake: set path to llvm-lit inside of llvm build dirAdrian Prantl2018-03-051-0/+1
| | | | llvm-svn: 326754
* Fix the install location of LLDBWrapPython.cpp when buildingAdrian Prantl2018-03-051-1/+3
| | | | | | | | | | | LLDB.framework to point to the build directory where it is expected by the top-level CMakeLists.txt. This should be a no-op in any other configurations. rdar://problem/38005302 llvm-svn: 326743
* [test] Skip pexpect-based lldb-mi tests on DarwinVedant Kumar2018-03-054-1/+20
| | | | | | | | | | | | | | | These tests fail with a relatively frequently on Darwin machines with errors such as: File ".../lldb/third_party/Python/module/pexpect-2.4/pexpect.py", line 1444, in expect_loop raise EOF(str(e) + '\n' + str(self)) EOF: End Of File (EOF) in read_nonblocking(). Empty string style platform. The unpredictable failures make these tests noisy. rdar://37046976 llvm-svn: 326739
* Including <functional> for std::bindRaphael Isemann2018-03-051-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44099 llvm-svn: 326727
* [test] Add dotest wrapperJonas Devlieghere2018-03-052-2/+31
| | | | | | | | | | | | | | | | | | | | | This adds a wrapper around dotest, similar to llvm-lit in llvm. The wrapper is created in the binary directory, next to LLDB and allows you to invoke dotest without having to pass any of the configuration arguments yourself. I think this could also be useful for re-running a particular test case when it fails, as an alternative to "Command Invoked". The motivation for this is that I'd like to replace the driver part of dotest with lit. As a first step, I'd like to have lit invoke dotest, which would just run the complete test suite, completely identical to what the CMake target does today. Once this is in place, we can have lit run dotest for the different test directories, and ultimately once per python file. Along the way we can strip out driver functionality from dotest where appropriate. https://reviews.llvm.org/D44002 llvm-svn: 326687
* llgs-tests: use the auto-parsing form of SendMessage for sending the ↵Pavel Labath2018-03-042-11/+8
| | | | | | continue packets llvm-svn: 326671
* ObjectFileMachO: use early return to remove one nesting level from ↵Pavel Labath2018-03-031-532/+513
| | | | | | | | CreateSections() NFCI llvm-svn: 326667
* Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function.Adrian Prantl2018-03-021-1/+2
| | | | llvm-svn: 326640
* Don't compile testcase with clang modules enabled.Adrian Prantl2018-03-022-2/+1
| | | | | | | It isn't actually necessary for what we are testing here and should fix the test on the Linux bots. llvm-svn: 326634
* Make the clang module cache setting available without a targetAdrian Prantl2018-03-0212-29/+134
| | | | | | | | | | | | | | | It turns out that setting the clang module cache after LLDB has a Target can be too late. In particular, the Swift language plugin needs to know the setting without having access to a Target. This patch moves the setting into the *LLDB* module cache, where it is a global setting that is available before any Target is created and more importantly, is shared between all Targets. rdar://problem/37944432 Differential Revision: https://reviews.llvm.org/D43984 llvm-svn: 326628
* [testsuite] Remove workaround for categories and inline tests.Jonas Devlieghere2018-03-021-9/+6
| | | | | | | | | | | | | | | | Adding categories to inline tests does not work because the attribute is set at the function level. For methods, this means it applies to all instances of that particular class. While this is what we want in most cases, it's not for inline tests, where different instances correspond to different tests. With the workaround in place, assigning a category to one test resulted in the category applied to *all* inline tests. This patch removes the workaround and throws an exception with an informative error message, to prevent this from happening in the future. llvm-svn: 326552
OpenPOWER on IntegriCloud