summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unnecessary target from TestCompletion patchRaphael Isemann2018-08-011-1/+0
| | | | | | | | | | As Jim pointed out, we don't need to manually create a target here because we already create a target implicitly in the very next line (which means we just created a target and don't use it). This patch just removes the line that creates the first unused target. llvm-svn: 338657
* [DWARFASTParser] Remove special cases for `llvm-gcc`Davide Italiano2018-08-011-26/+3
| | | | | | | | Reviewed by: aprantl, labath. Differential Revision: https://reviews.llvm.org/D48500 llvm-svn: 338638
* Fix out-of-bounds read in Stream::PutCStringAsRawHex8Raphael Isemann2018-08-012-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: When I added the Stream unit test (r338488), the build bots failed due to an out-of- bound reads when passing an empty string to the PutCStringAsRawHex8 method. In r338491 I removed the test case to fix the bots. This patch fixes this in PutCStringAsRawHex8 by always checking for the terminating null character in the given string (instead of skipping it the first time). It also re-adds the test case I removed. Reviewers: vsk Reviewed By: vsk Subscribers: vsk, lldb-commits Differential Revision: https://reviews.llvm.org/D50149 llvm-svn: 338637
* Fixed documentation for PutHex8 [NFC]Raphael Isemann2018-08-011-7/+3
| | | | | | | The previous documentation was just copied from PrintfAsRawHex8 but doesn't actually fit to the PutHex8 method. llvm-svn: 338611
* Remove outdated documentation for Stream's LEB128 methodsRaphael Isemann2018-08-011-6/+0
| | | | | | There is no format parameter for any of these methods. llvm-svn: 338605
* Introduce install-lldb-framework targetAlex Langford2018-08-014-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, I thought that install-liblldb would fail because CMake had a bug related to installing frameworks. In actuality, I misunderstood the semantics of `add_custom_target`: the DEPENDS option refers to specific files, not targets. Therefore `install-liblldb` should rely on the actual liblldb getting generated rather than the target. This means that the previous patch I committed (to stop relying on CMake's framework support) is no longer needed and has been reverted. Using CMake's framework support greatly simplifies the implementation. `install-lldb-framework` (and the stripped variant) is as simple as depending on `install-liblldb` because CMake knows that liblldb was built as a framework and will install the whole framework for you. The stripped variant will depend on the stripped variants of individual tools only to ensure they actually are stripped as well. Reviewers: labath, sas Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D50038 llvm-svn: 338594
* Don't ignore byte_order in Stream::PutMaxHex64Raphael Isemann2018-08-012-3/+29
| | | | | | | | | | | | Reviewers: labath Reviewed By: labath Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D50025 llvm-svn: 338591
* [StackFrame] Add doxygen comments to the StackFrameList API (NFC)Vedant Kumar2018-08-012-27/+53
| | | | | | | | | Clarify how StackFrameList works by documenting its methods. Also, delete some dead code and insert some TODOs. Differential Revision: https://reviews.llvm.org/D50087 llvm-svn: 338590
* [StackFrame] Use early returns in ResetCurrentInlinedDepth (NFC)Vedant Kumar2018-08-012-117/+109
| | | | | | | Using early returns in this function substantially reduces the nesting level, making the logic easier to understand. llvm-svn: 338589
* [StackFrame] Factor GetOnlyConcreteFramesUpTo out of GetFramesUpTo (NFC)Vedant Kumar2018-08-012-163/+168
| | | | | | | | Splitting GetOnlyConcreteFramesUpTo will make it easier to implement support for synthetic tail call frames in backtraces. This is just a prep change, no functionality is affected. llvm-svn: 338588
* Removed failing StreamTest caseRaphael Isemann2018-08-011-6/+0
| | | | | | | | The suspicious behavior is obviously because this method reads OOB memory, so I'll remove it for now and re-add the test alongside the fix later. llvm-svn: 338491
* Added initial unit test for LLDB's Stream class.Raphael Isemann2018-08-012-0/+481
| | | | | | | | | | | | | | | | | | | | | Summary: This adds an initial small unit test for LLDB's Stream class, which should at least cover most of the functions in the Stream class. StreamString is always in big endian mode, so that's the only stream byte order path this test covers as of now. Also, the binary mode still needs to be tested for all print methods. Also adds some FIXMEs for wrong/strange result values of the Stream class that we hit while testing those functions. Reviewers: labath Reviewed By: labath Subscribers: probinson, labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D50027 llvm-svn: 338488
* Android is an environment and we were comparing the android tripleEric Christopher2018-07-311-3/+3
| | | | | | | | | against the OS rather than the environment. Also update other uses of OS when we meant environment in the android local code. NFC intended. llvm-svn: 338460
* Tidy up comment.Eric Christopher2018-07-311-2/+2
| | | | llvm-svn: 338459
* Use UnknownVendor rather than UnknownArch since they're in two different enumsEric Christopher2018-07-311-1/+1
| | | | | | and we're switching on vendor and not arch. llvm-svn: 338458
* Remove Stream::UnitTestRaphael Isemann2018-07-312-47/+0
| | | | | | | | | | | | | | Summary: No one is using this method, and it also doesn't really make a lot of sense to have it around. Reviewers: davide Reviewed By: davide Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D50026 llvm-svn: 338345
* Remove unnecessary newlines from break command help text.Raphael Isemann2018-07-301-2/+2
| | | | | | | | | | | | Summary: We usually don't have trailing newlines in the short help strings. This just adds unnecessary extra lines when printing the help text of these commands. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50015 llvm-svn: 338311
* Remove friend class declarations from DWARFUnit and DWARFCompileUnitJan Kratochvil2018-07-292-4/+0
| | | | | | They are no longer needed since D45170. llvm-svn: 338224
* Add the actually calculated completions to COMPLETION_MSGRaphael Isemann2018-07-272-4/+5
| | | | | | | | | | Summary: Otherwise this assertion message is not very useful to whoever is reading the log. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49947 llvm-svn: 338179
* Revert "Stop building liblldb with CMake's framework functionality"Alex Langford2018-07-276-55/+38
| | | | | | | | | | This reverts r338154. This change is actually unnecessary, as the CMake bug I referred to was actually not a bug but a misunderstanding of CMake. Original Differential Revision: https://reviews.llvm.org/D49888 llvm-svn: 338178
* Add missing boundary checks to variable completion.Raphael Isemann2018-07-273-5/+53
| | | | | | | | | | Summary: Stopgap patch to at least stop all the crashes I get from this code. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49949 llvm-svn: 338177
* Fix whitespace in the python test suite.Raphael Isemann2018-07-2763-153/+149
| | | | | | | | | | | | | Summary: The test suite has often unnecessary trailing whitespace, and sometimes unnecessary trailing lines or a missing final new line. This patch just strips trailing whitespace/lines and adds missing newlines at the end. Subscribers: ki.stfu, JDevlieghere, christof, lldb-commits Differential Revision: https://reviews.llvm.org/D49943 llvm-svn: 338171
* Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-279-222/+0
| | | | | | | This broke a linux bot which doesn't support -std=c++17. The solution is to add a decorator to skip these tests on machines with older compilers. llvm-svn: 338162
* Recommit [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-279-0/+222
| | | | | | | | | | This should have all the correct files now. <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 338156
* Stop building liblldb with CMake's framework functionalityAlex Langford2018-07-276-38/+55
| | | | | | | | | | | | Summary: CMake has a bug in its ninja generator that prevents you from installing targets that are built with framework support. Therefore, I want to not rely on CMake's framework support. See https://gitlab.kitware.com/cmake/cmake/issues/18216 Differential Revision: https://reviews.llvm.org/D49888 llvm-svn: 338154
* Narrow the CompletionRequest API to being append-only.Raphael Isemann2018-07-2726-130/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently allow any completion handler to read and manipulate the list of matches we calculated so far. This leads to a few problems: Firstly, a completion handler's logic can now depend on previously calculated results by another handlers. No completion handler should have such an implicit dependency, but the current API makes it likely that this could happen (or already happens). Especially the fact that some completion handler deleted all previously calculated results can mess things up right now. Secondly, all completion handlers have knowledge about our internal data structures with this API. This makes refactoring this internal data structure much harder than it should be. Especially planned changes like the support of descriptions for completions are currently giant patches because we have to refactor every single completion handler. This patch narrows the contract the CompletionRequest has with the different handlers to: 1. A handler can suggest a completion. 2. A handler can ask how many suggestions we already have. Point 2 obviously means we still have a dependency left between the different handlers, but getting rid of this is too large to just append it to this patch. Otherwise this patch just completely hides the internal StringList to the different handlers. The CompletionRequest API now also ensures that the list of completions is unique and we don't suggest the same value multiple times to the user. This property has been so far only been ensured by the `Option` handler, but is now applied globally. This is part of this patch as the OptionHandler is no longer able to implement this functionality itself. Reviewers: jingham, davide, labath Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49322 llvm-svn: 338151
* Add back lldb-framework-headers targetAlex Langford2018-07-261-0/+3
| | | | | | | | | | In r338058 we removed the target `lldb-framework-headers`, which mean lldb-framework no longer depended on `framework_headers`, so they never actually got generated. This is a partial revert of r338058: I added back the lldb-framework-headers target, but the framework-header-fix.sh script still runs on the copied headers. llvm-svn: 338074
* 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
OpenPOWER on IntegriCloud