summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace boolean parameter with enum value according r342633Tatyana Krasnukha2018-09-201-1/+1
| | | | llvm-svn: 342671
* Refactor FindVariable() core functionality into StackFrame out of SBFrameShafik Yaghmour2018-09-203-20/+52
| | | | | | | | | | rdar://problem/14365983 Patch by Shafik Yaghmour Differential Revision: https://reviews.llvm.org/D52247 llvm-svn: 342663
* [target] Change target create's behavior wrt loading dependent files.Jonas Devlieghere2018-09-206-12/+224
| | | | | | | | | | | | | | | | | | | | When creating a target, lldb loads all dependent files (i.e. libs in LC_LOAD_DYLIB for Mach-O). This can be confusing, especially when two versions of the same library end up in the shared cache. It's possible to change this behavior, by specifying target create -d <target> these dependents are not loaded. This patch changes the default behavior to only load dependent files only when the target is an executable. When creating a target for a library, it is now no longer necessary to pass -d. The user can still override this behavior by specifying the -d option to change this behavior. rdar://problem/43721382 Differential revision: https://reviews.llvm.org/D51934 llvm-svn: 342634
* [NFC] Turn "load dependent files" boolean into an enumJonas Devlieghere2018-09-2025-64/+88
| | | | | | | | | | | | | | This is an NFC commit to refactor the "load dependent files" parameter from a boolean to an enum value. We want to be able to specify a default, in which case we decide whether or not to load the dependent files based on whether the target is an executable or not (i.e. a dylib). This is a dependency for D51934. Differential revision: https://reviews.llvm.org/D51859 llvm-svn: 342633
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-199-0/+458
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342563
* Allow use of self.filecheck in LLDB tests (c.f self.expect)Vedant Kumar2018-09-189-70/+137
| | | | | | | | | | | | | Add a "filecheck" method to the LLDB test base. This allows test authors to pattern match command output using FileCheck, making it possible to write stricter tests than what `self.expect` allows. For context (motivation, examples of stricter checking, etc), see the lldb-dev thread: "Using FileCheck in lldb inline tests". Differential Revision: https://reviews.llvm.org/D50751 llvm-svn: 342508
* Revert "[DataFormatters] Add formatter for C++17 std::variant"Shafik Yaghmour2018-09-179-475/+0
| | | | | | | | This reverts commit r342421. Because it breaks build bot http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console llvm-svn: 342424
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-179-0/+475
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342421
* Add docs for scripted breakpoint resolversJim Ingham2018-09-171-0/+189
| | | | | | Differential Revision: https://reviews.llvm.org/D52065 llvm-svn: 342419
* Revert "[IRInterpreter] Minor cleanups, add comments. NFCI."Davide Italiano2018-09-171-3/+7
| | | | | | This breaks buildbots. llvm-svn: 342404
* Add descriptions to completed expressionsRaphael Isemann2018-09-172-8/+65
| | | | | | | | | | | | | | | | | Summary: Completing inside the expression command now uses the new description API to also provide additional information to the user. For now this information are the types of variables/fields and the signatures of completed function calls. Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D52103 llvm-svn: 342385
* [lldb-mi] Correct regex in the symbol-list-lines testAlexander Polyakov2018-09-151-2/+2
| | | | | | | | | | | | | | | | | | | Summary: The test failed in case of compiling a test suite with gcc (checked versions are 5.2.0 and 7.3.0) because it adds one more line entry comparing to clang. It doesn't break the test's logic, so I just added a regex that matches this case. Reviewers: tatyana-krasnukha, aprantl, clayborg Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D52101 llvm-svn: 342329
* [IRInterpreter] Minor cleanups, add comments. NFCI.Davide Italiano2018-09-141-7/+3
| | | | llvm-svn: 342280
* Fix lldb-vscode README.mdAlex Langford2018-09-141-8/+8
| | | | | | | | | | Summary: The readme was missing "-" characters to enable links Patch by Nathan Lanza <nathan@lanza.io> Differential Revision: https://reviews.llvm.org/D52069 llvm-svn: 342266
* [IRInterpreter] Fall back to JIT with 128-bit values.Davide Italiano2018-09-144-0/+27
| | | | | | | | | | | | | They're not that common, and falling back is definitely better than throwing an error instead of the result. If we feel motivated, we might end up implementing support for these, but it's unclear whether it's worth the effort/complexity. Fixes PR38925. <rdar://problem/44436068> llvm-svn: 342262
* Make the eSearchDepthFunction searches work, add tests Jim Ingham2018-09-144-10/+80
| | | | | | | | using the scripted breakpoint resolver. Differential Revision: https://reviews.llvm.org/D52111 llvm-svn: 342259
* [PDB] Use the raw PDB symbol interface more accuratelyAleksandr Urakov2018-09-141-13/+39
| | | | | | | | | | | | | | | | | | Summary: This patch adds some symbol tag checks before using the `IPDBRawSymbol` interface to improve safety and readability. Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51967 llvm-svn: 342208
* svn add the new files...Jim Ingham2018-09-137-0/+532
| | | | | | | | | I started from a clean slate to do the checkin, but forgot to svn add the new files. Do that now. Also add the one new source file to CMakeLists.txt llvm-svn: 342190
* Remember to sort the Xcode project file. NFC.Jim Ingham2018-09-131-2612/+2612
| | | | llvm-svn: 342188
* Add a "scripted" breakpoint type to lldb.Jim Ingham2018-09-1327-2633/+3257
| | | | | | | | | | This change allows you to write a new breakpoint type where the logic for setting breakpoints is determined by a Python callback written using the SB API's. Differential Revision: https://reviews.llvm.org/D51830 llvm-svn: 342185
* Add support for descriptions with command completions.Raphael Isemann2018-09-1318-106/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a framework for adding descriptions to the command completions we provide. It also adds descriptions for completed top-level commands so that we can test this code. Completions are in general supposed to be displayed alongside the completion itself. The descriptions can be used to provide additional information about the completion to the user. Examples for descriptions are function signatures when completing function calls in the expression command or the binary name when providing completion for a symbol. There is still some boilerplate code from the old completion API left in LLDB (mostly because the respective APIs are reused for non-completion related purposes, so the CompletionRequest doesn't make sense to be used), so that's why I still had to change some function signatures. Also, as the old API only passes around a list of matches, and the descriptions are for these functions just another list, I had to add some code that essentially just ensures that both lists are always the same side (e.g. all the manual calls to `descriptions->AddString(X)` below a `matches->AddString(Y)` call). The initial command descriptions that come with this patch are just reusing the existing short help that is already added in LLDB. An example completion with descriptions looks like this: ``` (lldb) pl Available completions: platform -- Commands to manage and create platforms. plugin -- Commands for managing LLDB plugins. ``` Reviewers: #lldb, jingham Reviewed By: #lldb, jingham Subscribers: jingham, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D51175 llvm-svn: 342181
* NativeProcessProtocol: Sink ReadMemoryWithoutTrap into base classPavel Labath2018-09-136-26/+11
| | | | | | | | The two existing implementations have the function implemented identically, and there's no reason to believe that this would be different for other implementations. llvm-svn: 342167
* [LLDB] - Improved DWARF5 support.George Rimar2018-09-1318-81/+393
| | | | | | | | | This patch improves the support of DWARF5. Particularly the reporting of source code locations. Differential revision: https://reviews.llvm.org/D51935 llvm-svn: 342153
* [DWARFExpression] Read literars as unsigned values.Jonas Devlieghere2018-09-134-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | After landing r341457, we started seeing a failure on the swift-lldb bots. The change was correct and pretty straightforward, a DW_OP_constu was replaced with DW_OP_lit23, the value remaining identical. 0x000000f4: DW_TAG_variable DW_AT_location (0x00000000 [0x0000000100000a51, 0x0000000100000d47): DW_OP_lit23, DW_OP_stack_value) DW_AT_name ("number") However, this broke LLDB. (Int) number = <extracting data from value failed> The value was read correctly, but apparently the value's type was different. When reading a constu it was reading a uint64 (m_type = e_ulonglong) while for the literal, it got a signed int (m_type = e_sint). This change makes sure we read the value as an unsigned. Differential revision: https://reviews.llvm.org/D51730 llvm-svn: 342142
* Remove byte counting from SourceManager [NFC]Raphael Isemann2018-09-131-10/+10
| | | | | | | | | | | | | | | | Summary: Similar to what we did in D50681, we now stop manually byte counting here in the SourceManager. Reviewers: #lldb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: JDevlieghere, abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D50809 llvm-svn: 342121
* Commit my attempt to test the change to ProcessGDBRemoteJason Molenda2018-09-122-0/+52
| | | | | | | | in r336956. This test doesn't actually test the change that was submitted by Venkata, but it's a good one to add. llvm-svn: 342085
* Do not create new terminals when launching process on Windows with --no-stdioDavid Bolvansky2018-09-121-0/+3
| | | | | | | | | | | | | | Summary: Partially fixes PR38222 Reviewers: teemperor, zturner, stella.stamenova Reviewed By: zturner, stella.stamenova Subscribers: JDevlieghere, clayborg, labath, abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D51966 llvm-svn: 342075
* If we fail to get an armv7em-- disassembler from llvm, skip theJason Molenda2018-09-121-1/+4
| | | | | | | | | | | | tests and don't mark this as a failure. This happens when we've linked against an llvm without the ARM target built in. Davide added some cmake conditionals to avoid building this test when the target was absent from llvm's build, but we're still finding some bots that manage to get in this situation. <rdar://problem/44270082> llvm-svn: 342072
* Add compatibility version to liblldb in framework buildsAlex Langford2018-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Building LLDB with xcodebuild sets the compatibility version of liblldb in LLDB.framework. Building the framework with cmake does not set the compatibility version, and so it defaults to 0.0.0. This is a discrepency in the difference between the xcode build and the cmake build. I tested this change by building without this patch. From the build tree I ran `otool -L Library/Frameworks/LLDB.framework/Versions/A/LLDB` and got this: ``` @rpath/LLDB.framework/Versions/A/LLDB (compatibility version 0.0.0, current version 8.0.0) ``` Did the same with this patch and the output contained this: ``` @rpath/LLDB.framework/Versions/A/LLDB (compatibility version 1.0.0, current version 8.0.0) ``` Reviewers: clayborg, labath Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D51959 llvm-svn: 342066
* Fix two issues in PDBASTParserPavel Labath2018-09-121-17/+16
| | | | | | | - gcc warning about using binary or for or-ing two comparisons (a == b | a == c) - llvm style prefers static functions to functions in an anonymous namespace llvm-svn: 342051
* Move SafeMachO from Utility to HostPavel Labath2018-09-1216-17/+10
| | | | | | | | | | | | | | | | | | | | | | Summary: One of the conclusions of the discussion on D49740 was that SafeMachO is better off in the Host module (as that's the only place which should include mach/machine.h, which is what this header is working around). Also, Utility, which is the only module which cannot include Host, should not be doing anything with object file formats. This patch implements that move, and also removes any unneded includes of that file. I've verified that MacOS still compiles after this. Reviewers: jingham, zturner, teemperor Subscribers: fedor.sergeev, lldb-commits Differential Revision: https://reviews.llvm.org/D50383 llvm-svn: 342050
* Remove another unused mislayered include.Benjamin Kramer2018-09-121-1/+0
| | | | llvm-svn: 342047
* Remove unused include that's also a layering violation.Benjamin Kramer2018-09-121-1/+0
| | | | llvm-svn: 342046
* Remove manual byte counting from internal Stream methods.Raphael Isemann2018-09-122-36/+61
| | | | | | | | | | | | | | | | | | Summary: This patch removes the manual byte counting in all internal Stream methods. This is now done by the automatic byte counting provided by calling `GetWrittenBytes()` before and after writing the data (which is automatically done for us by the `ByteDelta` utility class). Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D50681 llvm-svn: 342044
* Add a basic test for 'memory region'Raphael Isemann2018-09-123-0/+73
| | | | | | | | | | | | | | | | Summary: The 'memory region' command is at the moment not tested at all by our test suite. This patch just adds a basic test that at least provides some basic testing. Reviewers: #lldb, davide Reviewed By: #lldb, davide Subscribers: vsk, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D51930 llvm-svn: 342042
* Reduce alignment on struct XSAVE, fixing a gcc warningPavel Labath2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The warning is about heap-allocating a struct with bigger alignment requirements than the standard heap allocator provides. AFAICT, all uses of the XSAVE struct are already heap-allocated, so this high alignment does not actually have any effect and removing it should be NFC. I have also done some digging in the commit history. This alignment requirement was since the XSAVE struct was introduced in r180572 when adding AVX register support for linux. It does not mention the alignment specifically, so I am guessing this was just put there because the corresponging XSAVE cpu instruction requires its buffer to be 64-byte aligned. However, LLDB will not be normally reading this struct via the XSAVE instruction directly. Instead we will ask the kernel to copy the buffer saved when suspeding the inferior. This should not require such strict alignment (in fact, linux kernel will happily do this for any alignment). llvm-svn: 342029
* [MIPS] Fix signed overflow in DADDIU emulationVedant Kumar2018-09-111-1/+12
| | | | | | | | This fixes a signed integer overflow diagnostic reported by ubsan. rdar://44353380 llvm-svn: 342008
* Refactoring std::function formatter to move core functionality into ↵Shafik Yaghmour2018-09-113-197/+269
| | | | | | | | | | CPPLanguageRuntime Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51896 llvm-svn: 341991
* Remove undefined behavior around the use of StateTypeShafik Yaghmour2018-09-113-3/+34
| | | | | | | | | | rdar://problem/43530233 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51445 llvm-svn: 341957
* [PDB] Fix problems after rL341782Aleksandr Urakov2018-09-114-6/+54
| | | | | | | | | | | | | Summary: This commit fixes following problems after rL341782: - Broken SymbolFilePDBTests - Warning on comparison of integers of different signs Tags: #lldb Differential Revision: https://reviews.llvm.org/D51162 llvm-svn: 341942
* Print the correct error when our DynamicCheckerFunctions fail to installRaphael Isemann2018-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: The check is inverted here: If we have error messages, we should print those instead of our default error message. But currently we print the default message when we actually have a sensible error to print. Fixes https://bugs.llvm.org/show_bug.cgi?id=38383 Thanks Nat for the patch! Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D51602 llvm-svn: 341940
* [NFC] Fix compiler warning in TestArmv7Disassembly.cppRaphael Isemann2018-09-111-1/+1
| | | | | | | | | | The warning is comparison of integers of different signs: 'const int' and 'const unsigned long' and triggered by EXPECT_EQ (num_of_instructions, inst_list.GetSize()); as num_of_instructions is an int in this comparison (and the RHS is size_t). llvm-svn: 341931
* Undoing first commit which added a space to a commentShafik Yaghmour2018-09-101-1/+1
| | | | llvm-svn: 341881
* First test commit into svn, adding space to commentShafik Yaghmour2018-09-101-1/+1
| | | | llvm-svn: 341879
* Rollback "Fix raw address breakpoints not resolving".Davide Italiano2018-09-104-45/+23
| | | | | | | It broke a bunch of bots. Ted confirmed, but can't revert for now so I'm reverting on his behalf. llvm-svn: 341878
* Fix raw address breakpoints not resolvingTed Woodward2018-09-104-23/+45
| | | | | | | | | | | | | | Summary: An address breakpoint of the form "b 0x1000" won't resolve if it's created while the process isn't running. This patch deletes Address::SectionWasDeleted, renames Address::SectionWasDeletedPrivate to SectionWasDeleted (and makes it public), and changes the section check in Breakpoint::ModulesChanged back to its original form Reviewers: jingham, #lldb Reviewed By: jingham Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D51816 llvm-svn: 341849
* [PDB] Restore AST from PDB symbolsAleksandr Urakov2018-09-1012-184/+863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds an implementation of retrieving of declarations and declaration contexts based on PDB symbols. PDB has different type symbols for const-qualified types, and this implementation ensures that only one declaration was created for both const and non-const types, but creates different compiler types for them. The implementation also processes the case when there are two symbols corresponding to a variable. It's possible e.g. for class static variables, they has one global symbol and one symbol belonging to a class. PDB has no info about namespaces, so this implementation parses the full symbol name and tries to figure out if the symbol belongs to namespace or not, and then creates nested namespaces if necessary. Reviewers: asmith, zturner, labath Reviewed By: asmith Subscribers: aleksandr.urakov, teemperor, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51162 llvm-svn: 341782
* Speculative fix for NetBSD bot for r341758Pavel Labath2018-09-092-8/+8
| | | | llvm-svn: 341759
* Re-commit "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath2018-09-097-144/+62
| | | | | | | | | | | | | This recommits r341487, which was reverted due to failing tests with clang. It turned out I had incorrectly expected that the literal arrays passed to ArrayRef constructor will have static (permanent) storage. This was only the case with gcc, while clang was constructing them on stack, leading to dangling pointers when the function returns. The fix is to explicitly assign static storage duration to the opcode arrays. llvm-svn: 341758
* Revert "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath2018-09-087-58/+146
| | | | | | | This reverts commit r341487. Jan Kratochvil reports it breaks LLDB when compiling with clang. llvm-svn: 341747
OpenPOWER on IntegriCloud