summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Make framework-header-fix process copied headersAlex Langford2018-07-261-9/+5
| | | | | | | | | | | | | | | Summary: Previously the framework-header-fix script would change the sources before they were copied, leading to unnecessary rebuilds on repeat `ninja lldb` invocations. This runs the script on the headers after they're copied into the produced LLDB.framework, meaning it doesn't affect any files being built. Patch by Keith Smiley <keithbsmiley@gmail.com>! Differential Revision: https://reviews.llvm.org/D49779 llvm-svn: 338058
* Fix duplicate suggestions after an ambiguous commandRaphael Isemann2018-07-262-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: So far lldb is printing this when it finds an ambiguous command: ``` (lldb) g Ambiguous command 'g'. Possible matches: gdb-remote gui gdb-remote gui ``` The duplicates come from the fact that we call the same query twice with the same parameters and add it to the same list. This patch just removes the second query call to `GetCommandObject`. As `GetCommandObject` is const and the name parameter is also not modified, this shouldn't break anything else. I didn't merge the remaining if statement into the else as I think otherwise the `if obj==nullptr do X else Y` pattern in there becomes hard to recognize. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49866 llvm-svn: 338043
* Don't print two errors for unknown commands.Raphael Isemann2018-07-263-27/+40
| | | | | | | | | | | | | | | | | | | Summary: We always print two error messages when we hit an unknown command. As the function `CommandInterpreter::HandleCommand` that prints the second error message unconditionally called the `CommandInterpreter::ResolveCommandImpl` before (which prints the first error message), we can just remove that second error message. Fixes https://bugs.llvm.org/show_bug.cgi?id=38312 Reviewers: labath Reviewed By: labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D49831 llvm-svn: 338040
* Revert "[DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-254-178/+0
| | | | | | | I forgot to git add some files. I'm going to recommit the correct version at once soon. llvm-svn: 337963
* [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-254-0/+178
| | | | | | | | | | <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 337959
* [ProcessGDBRemote] handle result from ConnectToDebugserverJonas Devlieghere2018-07-251-1/+1
| | | | | | | We ignored the result from ConnectToDebugserver, causing certain errors (like a failed handshake) not to surface. llvm-svn: 337932
* Use LLVM's new ItaniumPartialDemangler in LLDBStefan Granitz2018-07-255-46/+59
| | | | | | | | | | | | | | | Summary: Replace the existing combination of FastDemangle and the fallback to llvm::itaniumDemangle() with LLVM's new ItaniumPartialDemangler. It slightly reduces complexity and slightly improves performance, but doesn't introduce conceptual changes. This patch is preparing for more fundamental improvements on LLDB's demangling approach. Reviewers: friss, jingham, erik.pilkington, labath, clayborg, mgorny, davide, JDevlieghere Reviewed By: JDevlieghere Subscribers: teemperor, JDevlieghere, labath, clayborg, davide, lldb-commits, mgorny, erik.pilkington Differential Revision: https://reviews.llvm.org/D49612 llvm-svn: 337931
* Fix PythonString::GetString for >=python-3.7Pavel Labath2018-07-251-3/+5
| | | | | | | | The return value of PyUnicode_AsUTF8AndSize is now "const char *". Thanks to Brett Neumeier for testing the patch out on python 3.7. llvm-svn: 337908
* Add unit tests for VMRangeRaphael Isemann2018-07-242-0/+153
| | | | | | | | Subscribers: clayborg, labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49415 llvm-svn: 337873
* Add DumpRegisterValue.cpp.Jason Molenda2018-07-241-4/+4
| | | | llvm-svn: 337865
* Remove unused History classRaphael Isemann2018-07-244-163/+0
| | | | | | | | | | | | | | Summary: This class doesn't seem to be used anywhere, so we might as well remove the code. Reviewers: labath Reviewed By: labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49755 llvm-svn: 337855
* Move dumping code out of RegisterValue classPavel Labath2018-07-2411-77/+128
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The dump function was the only part of this class which depended on high-level functionality. This was due to the DumpDataExtractor function, which uses info from a running target to control dump format (although, RegisterValue doesn't really use the high-level part of DumpDataExtractor). This patch follows the same approach done for the DataExtractor class, and extracts the dumping code into a separate function/file. This file can stay in the higher level code, while the RegisterValue class and anything that does not depend in dumping can stay go to lower layers. The XCode project will need to be updated after this patch. Reviewers: zturner, jingham, clayborg Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D48351 llvm-svn: 337832
* Reimplement EventDataBytes::Dump to avoid DumpDataExtractorPavel Labath2018-07-243-9/+33
| | | | | | This is the only external non-trivial dependency of the Event classes. llvm-svn: 337819
* Added unit test for StreamTeeRaphael Isemann2018-07-243-0/+202
| | | | | | | | | | | | Reviewers: davide Reviewed By: davide Subscribers: davide, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49708 llvm-svn: 337778
* Change sort-pbxproj.rb to find the project.pbxproj in the Jason Molenda2018-07-231-8/+18
| | | | | | | most likely locations. And have it overwrite the original file with the sorted output. llvm-svn: 337774
* Fix Xcode project for unit tests.Greg Clayton2018-07-231-4/+0
| | | | llvm-svn: 337758
* [cmake] Remove unused ${LLDB_PLUGINS} dependency from our Objective-C++ ↵Raphael Isemann2018-07-232-2/+0
| | | | | | | | | | | | | | | | | | | | CMake config Summary: LLDB_PLUGINS doesn't exist as a variable, so this line doesn't add any dependencies and is just confusing. It seems this slipped in from the gdb-remote CMake I was using as a CMake template. The gdb-remote CMake itself is using a local LLDB_PLUGINS variable, so that code is fine. Reviewers: davide Reviewed By: davide Subscribers: davide, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49695 llvm-svn: 337741
* [NFC] Minor code refactoring.Raphael Isemann2018-07-231-4/+1
| | | | | | | | Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49696 llvm-svn: 337737
* Add support for parsing Breakpad minidump files that can have extra padding ↵Greg Clayton2018-07-239-3/+96
| | | | | | | | in the module, thread and memory lists. Differential Revision: https://reviews.llvm.org/D49579 llvm-svn: 337694
* Fix windows build after r337689Alexander Polyakov2018-07-231-0/+1
| | | | | | Added missing header. llvm-svn: 337692
* [lldb-mi] Re-implement data-info-line command.Alexander Polyakov2018-07-236-199/+118
| | | | | | | | | | | | | | Summary: Now data-info-line command uses SB API instead of HandleCommand. Reviewers: aprantl, clayborg, jingham Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D49062 llvm-svn: 337689
* Defend LoadImageUsingPaths against a path listJim Ingham2018-07-202-2/+23
| | | | | | with empty paths on it. llvm-svn: 337515
* Added unit tests for FlagsRaphael Isemann2018-07-192-0/+200
| | | | | | | | | | | | Reviewers: labath Reviewed By: labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49435 llvm-svn: 337475
* ELF: Replace the header-extension unit test with a lit onePavel Labath2018-07-194-64/+73
| | | | | | | | | The new test checks that we are actually able to read data from these kinds of elf headers correctly instead of just that we read the section number correctly. It is also easier to figure out what's going on in the test. llvm-svn: 337459
* Fix whitespace formatting in DWARFExpression::DumpLocationPavel Labath2018-07-191-14/+14
| | | | | | | | we were printing an extra space before the start for the expression and an extra space after some dwarf operators. This makes sure we only print exactly one space **between** operators and nowhere else. llvm-svn: 337452
* Fix variables.test after D49018Stella Stamenova2018-07-181-7/+7
| | | | | | | | | | | | | | Summary: This one fixes variables.test after D49018. The test was broken because D49018 adds a location information to variables, but I hadn't noticed that, because I used 32-bit build to run tests, so the test looked to me already broken before that commit (the test relies on mangled names, but the mangling schemes are different for 32-bit and 64-bit). Reviewers: stella.stamenova, lldb-commits Reviewed By: stella.stamenova Patch By: Aleksandr Urakov Differential Revision: https://reviews.llvm.org/D49475 llvm-svn: 337397
* [windows] Use a well-known path for ComSpec if we fail to retrieve itStella Stamenova2018-07-181-2/+7
| | | | | | | | | | | | | | Summary: Right now we always try to retrieve ComSpec and if we fail, we give up. This rarely fails, but we can update the logic so that we fail even less frequently. Since there is a well-known path (albeit not always correct), try the path when we failed to retrieve it. Note that on other platforms, we generally just return a well-known path without any checking. Reviewers: asmith, zturner, labath Reviewed By: zturner, labath Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49451 llvm-svn: 337395
* [lit, lldbsuite] Remove tests that are duplicated between lit and lldb-suiteStella Stamenova2018-07-185-80/+0
| | | | | | | | | | | | Summary: Several tests exist in both lit and lldbsuite. This removes the lit version of the duplicated tests. Reviewers: asmith, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49450 llvm-svn: 337393
* Link the lldb driver ("lldb") against the llvm staticJason Molenda2018-07-171-3/+13
| | | | | | libraries because of the new prettystackprinter dependency. llvm-svn: 337335
* Invert dependency between lldb-framework and lldb-suiteAlex Langford2018-07-174-8/+10
| | | | | | | | | | | | | | | | | Summary: Currently, if you build lldb-framework the entire framework doesn't actually build. In order to build the entire framework, you need to actually build lldb-suite. This abstraction doesn't feel quite right because lldb-framework truly does depend on lldb-suite (liblldb + related tools). In this change I want to invert their dependency. This will mean that lldb and finish_swig will depend on lldb-framework in a framework build, and lldb-suite otherwise. Instead of adding conditional logic everywhere to handle this, I introduce LLDB_SUITE_TARGET to handle it. Differential Revision: https://reviews.llvm.org/D49406 llvm-svn: 337311
* [CMake] Have check-lldb-unit use CMAKE_CURRENT_BINARY_DIRJonas Devlieghere2018-07-171-2/+3
| | | | | | | | | | | | | | | llvm-lit uses `map_config` directives (generated at configuration-time) to make it possible to pass a test path relative to the source instead of the build folder (CMAKE_CURRENT_BINARY_DIR). However, this doesn't work in the case of swift where the build directory layout prevents llvm-lit from knowing about lldb and its test paths. This caused check-lldb-unit to fail in this configuration, while everything was working as expected upstream. This patch fixes the issue by passing a path relative to the build directory. This was already the case for check-lldb-lit. llvm-svn: 337291
* Move pretty stack trace printer into driver.Jonas Devlieghere2018-07-174-4/+21
| | | | | | | | | | | | We used to have a pretty stack trace printer in SystemInitializerCommon. This was disabled on Apple because we didn't want the library to be setting signal handlers, as this was causing issues when loaded into Xcode. However, I think it's useful to have this for the LLDB driver, so I moved it up to use the PrettyStackTraceProgram in the driver's main. Differential revision: https://reviews.llvm.org/D49377 llvm-svn: 337261
* [CMake] Give lldb tools functional install targets when building LLDB.frameworkAlex Langford2018-07-161-14/+6
| | | | | | | | | | | | | | | | | Summary: This change makes the install targets for lldb tools functional when building for the framework. I am currently working on the install rules for lldb-framework and this will let me make `install-lldb-framework` rely on `install-lldb-argdumper` for instance. This is especially important for `install-lldb-framework-stripped`. It is much better for `install-lldb-framework-stripped` to rely on `install-lldb-argdumper-stripped` than to copy and strip lldb-argdumper manually. Differential Revision: https://reviews.llvm.org/D49038 llvm-svn: 337202
* Fix some crashes and deadlocks in FormatAnsiTerminalCodesRaphael Isemann2018-07-163-3/+63
| | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a few problems with the FormatAnsiTerminalCodes function: * It does an infinite loop on an unknown color value. * It crashes when the color value is at the end of the string. * It deletes the first character behind the color token. Also added a few tests that reproduce those problems (and test some other corner cases). Reviewers: davide, labath Reviewed By: labath Subscribers: labath, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D49307 llvm-svn: 337189
* Fix typo in find-basic-function testPavel Labath2018-07-161-4/+4
| | | | | | | | | Wrong FileCheck header meant that we were not matching what we should. This allows us to get rid of the -allow-deprecated-dag-overlap flag in the test. llvm-svn: 337188
* Fix TestDataFormatterUnordered for older libc++ versionsPavel Labath2018-07-161-0/+5
| | | | | | | | | | | | | | clang recently started diagnosing "exception specification in declaration does not match previous declaration" errors. Unfortunately old libc++ versions had a bug, where they violated this rule, which means that tests using this library version now fail due to build errors. Since it was easy to work around the bug by compiling this test with -fno-exceptions, I do that here. If supporting old libc++ versions becomes a burden, we'll have to revisit this. llvm-svn: 337173
* Rollback r337070.Sterling Augustine2018-07-131-2/+0
| | | | | | Someone simultaneously fixed the breakage it was designed to fix. llvm-svn: 337071
* Update ClangASTContext for the new DependentVector type.Sterling Augustine2018-07-131-0/+2
| | | | | | https://reviews.llvm.org/D49326 llvm-svn: 337070
* [lldb-mi] Make symbol-list-lines.test XFAIL on WindowsAlexander Polyakov2018-07-131-0/+3
| | | | | | | It's a temporary decision until we reach out what causes a failure. llvm-svn: 337064
* Fix -Wswitch after introduction of clang;:Type::DependentVector in r337036Fangrui Song2018-07-131-0/+4
| | | | llvm-svn: 337063
* Make these tests c++ tests so they can be skipped on systems that don't ↵Jim Ingham2018-07-132-4/+7
| | | | | | support those tests. llvm-svn: 337058
* Fix the libcxx set, multiset, vector and bitset formatters to work on ↵Jim Ingham2018-07-1312-126/+239
| | | | | | | | | | | | | | | | references. The synthetic child providers for these classes had a type expression that matched pointers & references to the type, but the Front End only worked on the actual object. I fixed this by adding a way for the Synthetic Child FrontEnd provider to request dereference, and then had these formatters use that mode. <rdar://problem/40849836> Differential Revision: https://reviews.llvm.org/D49279 llvm-svn: 337035
* Add the new PDBLocationToDWARFExpression.{cpp,h} to the Xcode project.Jim Ingham2018-07-131-0/+6
| | | | llvm-svn: 337034
* Add includes for CompletionRequest to every file that uses itRaphael Isemann2018-07-138-2/+8
| | | | | | | | | | | | | | Summary: Should fix the builds (and prevent future builds from failing when people try to reduce includes). Reviewers: jingham Reviewed By: jingham Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D49311 llvm-svn: 337032
* Replaced more boilerplate code with CompletionRequest (NFC)Raphael Isemann2018-07-1338-704/+379
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: As suggested in D48796, this patch replaces even more internal calls that were using the old completion API style with a single CompletionRequest. In some cases we also pass an option vector/index, but as we don't always have this information, it currently is not part of the CompletionRequest class. The constructor of the CompletionRequest is now also more sensible. You only pass the user input, cursor position and your list of matches to the request and the rest will be inferred (using the same code we used before to calculate this). You also have to pass these match window parameters to it, even though they are unused right now. The patch shouldn't change any behavior. Reviewers: jingham Reviewed By: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D48976 llvm-svn: 337031
* No longer pass a StringRef to the Python APIRaphael Isemann2018-07-131-2/+3
| | | | | | | | | | | | | | | | | | Summary: The refactoring patch for DoExecute missed this case of a variadic function that just silently accepts a StringRef which it then tries to reinterpret as a C-string. This should fix the Windows builds. Reviewers: stella.stamenova Reviewed By: stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49309 llvm-svn: 337030
* Fix TestAttachDenied on macOS MojaveFrederic Riss2018-07-132-0/+15
| | | | | | | | | TestAttachDenied tries to attach to a process that is ptracing itself and verifies that we error out. Starting with macOS Mojave, processes need an entitlement to be able to ptrace. This commit adds the entitlement for the test binary when building on Darwin. llvm-svn: 337029
* Adjust thread name column width depending on real name length.Tatyana Krasnukha2018-07-131-1/+5
| | | | | | Make 16-byte aligned field instead of truncating a name to 16 byte. llvm-svn: 336993
* Add abbreviated name for Debugger::EventHandlerThread.Tatyana Krasnukha2018-07-131-5/+8
| | | | | | On OS's where thread names are limited to 16 bytes, the full name was truncated to not very meaningful "r.event-handler". llvm-svn: 336991
* Convert a location information from PDB to a DWARF expressionJonas Devlieghere2018-07-137-1/+681
| | | | | | | | | | | | | | | | | | The current version of SymbolFilePDB::ParseVariableForPDBData function always initializes variables with an empty location. This patch adds the converter of a location information from PDB to a DWARF expression, so it becomes possible to watch values of variables of primitive data types. At the moment the converter supports only Static, TLS, RegRel, Enregistered and Constant PDB location types, but it seems that it's enough for most cases. There are still some problems with retrieving values of variables (e.g. we can't watch variables of composite types), but they look not relevant to the conversion to DWARF. Patch by: Aleksandr Urakov Differential revision: https://reviews.llvm.org/D49018 llvm-svn: 336988
OpenPOWER on IntegriCloud