summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix offsetof usage that got lost when passing patches between linux and mac.Greg Clayton2018-08-062-14/+16
| | | | llvm-svn: 339033
* Add support for ARM and ARM64 breakpad generated minidump files (version 2).Greg Clayton2018-08-0616-33/+1805
| | | | | | | | | | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. This is a fixed version of: https://reviews.llvm.org/D49750 The changes from D49750 are: Don't init the m_arch in the Initialize call as a system info isn't required. This keeps the thread list, module list and other tests from failing Added -Wextended-offsetof to Xcode project so we catch use extended usages of offsetof before submission Fixed any extended offset of warnings Differential Revision: https://reviews.llvm.org/D50336 llvm-svn: 339032
* Fix Mangled::Compare()Stefan Granitz2018-08-061-1/+1
| | | | llvm-svn: 339015
* Add ConstString::IsNull() to tell between null vs. empty strings and fix ↵Stefan Granitz2018-08-063-2/+28
| | | | | | | | | | | | | | usage in Mangled::GetDemangledName() Summary: `IsEmpty()` and `operator bool() == false` have equal semantics. Usage in Mangled::GetDemangledName() was incorrect. What it actually wants is a check for null-string. Split this off of D50071 and added a test to clarify usage. Reviewers: labath, jingham Subscribers: erik.pilkington, lldb-commits Differential Revision: https://reviews.llvm.org/D50327 llvm-svn: 339014
* Change ConstString::SetCStringWithMangledCounterpart to use StringRefPavel Labath2018-08-064-32/+44
| | | | | | | This should simplify the upcoming demangling patch (D50071). While I was in there, I also added a quick test for the function. llvm-svn: 338995
* Remove duplicated code in CommandObjectQuitRaphael Isemann2018-08-061-7/+0
| | | | | | | | | | | | Summary: We already have the same check directly before, so this code can never be reached (as seen in the test coverage). Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50317 llvm-svn: 338976
* Added unit test for StringListRaphael Isemann2018-08-042-0/+513
| | | | | | | | | | | | Reviewers: labath Reviewed By: labath Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D50293 llvm-svn: 338961
* Fixed header of StringLexer.hRaphael Isemann2018-08-041-2/+1
| | | | llvm-svn: 338952
* Fix a bug in VMRangeLeonard Mosescu2018-08-042-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed a suspicious failure: [ RUN ] VMRange.CollectionContains llvm/src/tools/lldb/unittests/Utility/VMRangeTest.cpp:146: Failure Value of: VMRange::ContainsRange(collection, VMRange(0x100, 0x104)) Actual: false Expected: true Looking at the code, it is a very real bug: class RangeInRangeUnaryPredicate { public: RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} // note that _range binds to a temporary! bool operator()(const VMRange &range) const { return range.Contains(_range); } const VMRange &_range; }; This change fixes the bug. Differential Revision: https://reviews.llvm.org/D50290 llvm-svn: 338949
* Modify lldb_suite.py to enable python debuggingAlex Langford2018-08-031-1/+3
| | | | | | | | | | | | | | | Summary: pudb and pdb interfere with the behavior of the inspect module. calling `inspect.getfile(inspect.currentframe())` returns a different result depending on whether or not you're in a debugger. Calling `os.path.abspath` on the result of `inspect.getfile(...)` normalizes the result between the two environments. Patch by Nathan Lanza <lanza@fb.com> Differential Revision: https://reviews.llvm.org/D49620 llvm-svn: 338923
* Replace LLDB's LEB128 implementation with the one from LLVMRaphael Isemann2018-08-031-35/+9
| | | | | | | | | | | | Reviewers: davide, labath Reviewed By: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50162 llvm-svn: 338920
* Add raw_ostream wrapper to the Stream classRaphael Isemann2018-08-032-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This wrapper will allow us in the future to reuse LLVM methods from within the Stream class. Currently no test as this is intended to be an internal class that shouldn't have any NFC. The test for this change will be the follow up patch that migrates LLDB's LEB128 implementation to the one from LLVM. This change also adds custom move/assignment methods to Stream, as LLVM raw_ostream doesn't support these. As our internal stream has anyway no state, we can just keep the same stream object around. Reviewers: davide, labath Reviewed By: labath Subscribers: xiaobai, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D50161 llvm-svn: 338901
* Revert "Add support for ARM and ARM64 breakpad generated minidump files"Pavel Labath2018-08-0317-1862/+92
| | | | | | | | This reverts commit r338734 (and subsequent fixups in r338772 and r338746), because it breaks some minidump unit tests and introduces a lot of compiler warnings. llvm-svn: 338828
* [lldb] Remove unused variable.David L. Jones2018-08-021-1/+0
| | | | | | The use of this variable was removed in r338734. It now causes unused variable warnings. llvm-svn: 338772
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-028-2/+24
| | | | | | | | | | | | | | Summary: 1) Several tests that are flakey on windows fail the run even if they are marked as expected to be flakey. This is because they fail frequently enough that even a retry won't help 2) Skip several tests on Windows that will occasionally hang rather than failing or exiting. This is causing the entire test suite to hang Reviewers: asmith, labath, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D50198 llvm-svn: 338769
* Fix CMake build.Zachary Turner2018-08-021-0/+2
| | | | | | | Some new files were committed to the repository but not added to the CMakeLists.txt, so this patch fixes the build. llvm-svn: 338746
* Add support for ARM and ARM64 breakpad generated minidump filesGreg Clayton2018-08-0216-91/+1860
| | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. Differential Revision: https://reviews.llvm.org/D49750 llvm-svn: 338734
* Add byte counting mechanism to LLDB's Stream class.Raphael Isemann2018-08-0211-39/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch allows LLDB's Stream class to count the bytes it has written to so far. There are two major motivations for this patch: The first one is that this will allow us to get rid of all the handwritten byte counting code we have in LLDB so far. Examples for this are pretty much all functions in LLDB that take a Stream to write to and return a size_t, which usually represents the bytes written. By moving to this centralized byte counting mechanism, we hopefully can avoid some tricky errors that happen when some code forgets to count the written bytes while writing something to a stream. The second motivation is that this is needed for the migration away from LLDB's `Stream` and towards LLVM's `raw_ostream`. My current plan is to start offering a fake raw_ostream class that just forwards to a LLDB Stream. However, for this raw_ostream wrapper we need to fulfill the raw_ostream interface with LLDB's Stream, which currently lacks the ability to count the bytes written so far (which raw_ostream exposes by it's `tell()` method). By adding this functionality it is trivial to start rolling out our raw_ostream wrapper (and then eventually completely move to raw_ostream). Also, once this fake raw_ostream is available, we can start replacing our own code writing to LLDB's Stream by LLVM code writing to raw_ostream. The best example for this is the LEB128 encoding we currently ship, which can be replaced with by LLVM's version which accepts an raw_ostream. From the point of view of the pure source changes this test does, we essentially just renamed the Write implementation in Stream to `WriteImpl` while the `Write` method everyone is using to write its raw bytes is now just forwarding and counting the written bytes. Reviewers: labath, davide Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D50159 llvm-svn: 338733
* Move ClangHighlighter.cpp to hopefully better place in Xcode project.Tim Northover2018-08-021-2/+2
| | | | | | But with a write-only format, who can really say? llvm-svn: 338712
* Unit test for Symtab::InitNameIndexesStefan Granitz2018-08-023-1/+261
| | | | | | | | | | | | | | Summary: In order to exploit the potential of LLVM's new ItaniumPartialDemangler for indexing in LLDB, we expect conceptual changes in the implementation of the InitNameIndexes function. Here is a unit test that aims at covering all relevant code paths in that function. Reviewers: labath, jingham, JDevlieghere Reviewed By: JDevlieghere Subscribers: friss, teemperor, davide, clayborg, erik.pilkington, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D49909 llvm-svn: 338695
* Added missing highlighter files to XCode projectRaphael Isemann2018-08-021-0/+16
| | | | llvm-svn: 338669
* [LLDB] Added syntax highlighting supportRaphael Isemann2018-08-0231-8/+942
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds syntax highlighting support to LLDB. When enabled (and lldb is allowed to use colors), printed source code is annotated with the ANSI color escape sequences. So far we have only one highlighter which is based on Clang and is responsible for all languages that are supported by Clang. It essentially just runs the raw lexer over the input and then surrounds the specific tokens with the configured escape sequences. Reviewers: zturner, davide Reviewed By: davide Subscribers: labath, teemperor, llvm-commits, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D49334 llvm-svn: 338662
* 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
OpenPOWER on IntegriCloud