summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the Windows build after r327750Frederic Riss2018-03-161-1/+1
| | | | llvm-svn: 327753
* [DWARFASTParserClang] Complete external record types before using them as a ↵Frederic Riss2018-03-164-0/+68
| | | | | | | | | | | | | | | | | | decl context. Summary: When in a gmodules-like debugging scenario, you can have a parent decl context that gets imported from an external AST. When this happens, we must be careful to complete this type before adding children to it, otherwise it sometimes results in a crash. Reviewers: clayborg, jingham Subscribers: aprantl, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43592 llvm-svn: 327750
* Skip TestThreadSpecificBpPlusCondition on Darwin due to timeoutsVedant Kumar2018-03-161-0/+1
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1104/ llvm-svn: 327731
* Remove -gmodules restriction from testAdrian Prantl2018-03-161-1/+0
| | | | llvm-svn: 327729
* [dotest] Clean up test folder clean-upPavel Labath2018-03-1617-73/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
* Skip more lldb-mi tests which time out on DarwinVedant Kumar2018-03-161-0/+3
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1097/testReport/junit/TestMiTarget/MiTargetTestCase/test_lldbmi_target_attach_wait_for/ llvm-svn: 327692
* [cmake] Copy system debugserver from the right place when only CommandLineToolsVedant Kumar2018-03-161-2/+9
| | | | | | | | | | | | | | | | | | | are installed Instead of building debugserver when building lldb, I'd rather pass LLDB_CODESIGN_IDENTITY="" to cmake and use the one already on my system. However, on one of my machines I only have the CommandLineTools installed, and so the hardcoded path to the system debugserver does not work for me. Additionally, we should verify the LLDB framework exists on the machine before trying to set the path to debugserver. This allows us to warn the user at configure time that a system debugserver can't be found if they choose not to build it themselves. Patch by Alex Langford! Differential Revision: https://reviews.llvm.org/D44507 llvm-svn: 327691
* Split skipIf decorator, the condition is supposed to be ORAdrian Prantl2018-03-151-1/+2
| | | | llvm-svn: 327644
* [dotest] remove confirm_directory_exclusivity remnantsPavel Labath2018-03-151-13/+0
| | | | llvm-svn: 327643
* Fix TestProcessLaunch breakage on MacOSPavel Labath2018-03-151-1/+1
| | | | | | | | | | | | | This test started failing after r327625. The cause seems difference in the treatment of relative --stdin paths between MacOS (debugserver?) and linux (lldb-server?). Linux treats this as relative to the debuggers PWD, while MacOS as relative to (I think) the future PWD of the launched process. This fixes the issue by using absolute paths, which should work everywhere, but we should probably unify this path handling as well. I'll ask around about what is the expected behavior here. llvm-svn: 327633
* Next batch of test-tree-cleaning changesPavel Labath2018-03-159-171/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The changes here fall into several categories. - some tests were redirecting inferior stdout/err to a file. For these I make sure we use an absolute path for the file. I also create a lldbutil.read_file_on_target helper function to encapsulate the differences between reading a file locally and remotely. - some tests were redirecting the pexpect I/O into a file. For these I use a python StringIO object to avoid creating a file altogether. - the TestSettings inferior was creating a file. Here, I make sure the inferior is launched with pwd=build-dir so that the files end up created there. - lldb-mi --log (used by some tests) creates a log file in PWD without the ability say differently. To make this work I make sure to run lldb-mi with PWD=build_dir. This in turn necessitated a couple of changes in other lldb-mi tests, which were using relative paths to access the source tree. Reviewers: aprantl Subscribers: ki.stfu, mehdi_amini, lldb-commits Differential Revision: https://reviews.llvm.org/D44159 llvm-svn: 327625
* @skipUnlessDarwin TestTargetSourceMapPavel Labath2018-03-151-0/+1
| | | | | | Our MachO parser works only on darwin. llvm-svn: 327611
* Fix a bug in "target.source-map" where we would resolve unmapped paths ↵Greg Clayton2018-03-153-1/+438
| | | | | | | | | | | | | | | | | | incorrectly When using: (lldb) settings set target.source-map ./ /path/to/source LLDB would fail to set a source file and line breakpoint with: (lldb) breakpoint set --file /path/to/source/main.c --line 2 Because code in the target was undoing the remapping of "/path/to/source/main.c" to "./main.c" and then it would resolve this path, which would append the current working directory to the path. We don't want to resolve paths that we unmap. Test case added. Differential Revision: https://reviews.llvm.org/D44502 llvm-svn: 327600
* [test] cmake: Ensure liblldb builds before tests runVedant Kumar2018-03-151-0/+4
| | | | | | | Without liblldb as a test dependency, tests which link it in from an lldb framework (via Base.buildDriver()) won't work. llvm-svn: 327595
* [Dictionary] Rewrite the test added in r327587 as an inline test.Davide Italiano2018-03-156-20/+13
| | | | | | | | | | | | | | | Until we have a better story for putting commands and check lines in the same file (they're currently ignored), it seems that inline tests are actually more concise and easier to understand. Too bad we have still some python boilerplate, but that's not really substantial so we can live with it. Thanks to Fred for pointing out and Jim for explaining me how to use the inline test format. <rdar://problem/34806516> llvm-svn: 327592
* [DataFormatters] Implement summary for __NSDictionary0.Davide Italiano2018-03-145-0/+24
| | | | | | | | | | | | | | | | | | | Before the patch: (lldb) frame var emptyDictionary (__NSDictionary0 *) emptyDictionary = 0x0000000100304420 After: (lldb) frame var emptyDictionary (__NSDictionary0 *) emptyDictionary = 0x0000000100304420 0 key/value pairs There's nothing much else we can do, as this is always empty by definition. <rdar://problem/34806516> llvm-svn: 327587
* [test] Skip more lldb-mi tests which occasionally time out on DarwinVedant Kumar2018-03-141-1/+6
| | | | llvm-svn: 327586
* [test] Skip some lldb-mi tests which time out on DarwinVedant Kumar2018-03-142-0/+11
| | | | | | These don't always timeout, but it's inconvenient when they do. llvm-svn: 327568
* [test] Delete some xfailed lldb-mi testsVedant Kumar2018-03-147-638/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at removing some lldb-mi tests which have been xfailed and unmaintained for a while. We have open PRs for most of these tests already. I've opened up the following additional PRs: llvm.org/PR36739 - lldb-mi driver exits properly llvm.org/PR36740 - lldb-mi -gdb-set and -gdb-show llvm.org/PR36741 - lldb-mi -symbol-xxx The motivation here is to address timeout and pexpect-related issues in the test suite. This was discussed on lldb-dev in the thread: "increase timeout for tests?". After this change, the lldb-mi tests seem to be in better health (on Darwin at least). I consistently get: $ ./bin/llvm-dotest -p TestMi =================== Test Result Summary =================== Test Methods: 101 Reruns: 0 Success: 88 Expected Failure: 0 Failure: 0 Error: 0 Exceptional Exit: 0 Unexpected Success: 0 Skip: 13 Timeout: 0 Expected Timeout: 0 llvm-svn: 327552
* Use GetItemAtIndexAsString overload for ConstString and move set rather than ↵Tatyana Krasnukha2018-03-141-6/+3
| | | | | | copy. llvm-svn: 327549
* Reuse IsEmpty for ConstString::operator bool().Tatyana Krasnukha2018-03-141-1/+1
| | | | llvm-svn: 327548
* [dotest] Rename llvm-dotest -> lldb-dotest and make it a custom targetJonas Devlieghere2018-03-142-4/+7
| | | | | | | | | | This renames llvm-dotest to lldb-dotest and makes it a custom target so you can run `ninja lldb-dotest` to rebuild whatever is necessary before rerunning the tests. Differential revision: https://reviews.llvm.org/D44473 llvm-svn: 327519
* [test] Disable TestMachCore everywhere except on DarwinJonas Devlieghere2018-03-141-0/+1
| | | | | | | | | | Apparently the parser is wrapped inside ifdef's so the logic isn't available on non-Darwin platforms. Should fix build bot failure: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/20463 llvm-svn: 327512
* Update selected thread after loading mach coreJonas Devlieghere2018-03-144-3/+969
| | | | | | | | | | | The OS plugins might have updated the thread list after a core file has been loaded. The physical thread in the core file may no longer be the one that should be selected. Hence we should run the thread selection logic after loading the core. Differential revision: https://reviews.llvm.org/D44139 llvm-svn: 327501
* [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)Pavel Labath2018-03-141-5/+9
| | | | | | | | | | | | | | | | | | | | Summary: To make this build work, I needed to add detection code for the pthread library. This is necessary, because we have direct calls to these libraries (instead of going through llvm) and in the standalone build we cannot rely on llvm to detect these for us. In a standalone non-dylib build this was accidentaly working because these libraries were pulled in as an interface dependency of the .a files, but in a dylib build these are no longer part of the link interface, and so we need to add them explicitly. Reviewers: krytarowski, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D44379 llvm-svn: 327490
* Skip TestWatchedVarHitWhenInScope.py everywherePavel Labath2018-03-141-3/+1
| | | | | | | | | | | The expression-hits tracking logic is not available on any platform. The reason this tests happens to pass on some platforms is that the test is written poorly -- it relies on the fact that post-main cleanup code will write to the stack memory once occupied by the watched variable, but this is not the case everywhere (e.g. linux glibc does not seem to do this, but android's bionic library does). llvm-svn: 327483
* [SymbolFilePDB] Rewrite ParseTypes methodAaron Smith2018-03-141-19/+48
| | | | | | | | | | | | | | | | | | | | | Summary: The types for the compiland's children are parsed when parsing types for a PDB compiland. Global types also need to be parsed but unfortunately PDBs do not have compiland information about each global type. So we parse them all on the first call to ParseTypes. If a sc.function is provided then parse the types for that function. Otherwise parse the types for the overall sc.comp_unit. The ParseTypes method can be very slow if a program has a long list of compile units containing needed modules. Debugging clang-cl with lldb will show the problem. Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44253 llvm-svn: 327473
* [test] Replace some references to Apple-internal bugsVedant Kumar2018-03-1310-32/+14
| | | | | | | This removes around 10 references to Apple-internal radars. I've filed fresh bugs on bugs.llvm.org as appropriate for open issues. llvm-svn: 327463
* Add a missing return in SBPlatform::IsConnected and testJim Ingham2018-03-132-1/+9
| | | | | | | for the behavior - using the fact that the Host platform is always present & connected. llvm-svn: 327448
* [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
OpenPOWER on IntegriCloud