summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Fix up lldb after clang r360311.Richard Smith2019-05-091-2/+6
| | | | | | | | Patch by Tyker! Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360312
* Fix the output file dependency for Options.inc.Jim Ingham2019-05-091-1/+1
| | | | | | | | The script phase to do Options.td -> Options.inc was wrong (missing the "include" directory) so the rule didn't get run when Options.td changed. llvm-svn: 360304
* [Reproducers] Fix reproducer unittestJonas Devlieghere2019-05-081-1/+3
| | | | | | | | | | | | | | | I think the recent change to flush the SB API recording uncovered a real issue on the Windows bot. Although I couldn't make much sense of the error message "unknown file: error: SEH exception with code 0x3221225477 thrown in the test body.", it prompted me to look at the test. In the unit test we were recording during replay, which is obviously not correct. I think we didn't see this issue before because we flushed once after the recording was done. This patch unsets the recording logic during the replay part of the test. Hopefully this fixed the Windows bot. llvm-svn: 360298
* Fix bug in ArchSpec::MergeFromGreg Clayton2019-05-082-1/+27
| | | | | | | | | | Previous ArchSpec tests didn't catch this bug since we never tested just the OS being out of date. Fixed the bug and covered this with a test that would catch this. This was found when trying to load a core file where the core file was an ELF file with just the e_machine for architeture and where the ELF header had no OS set in the OSABI field of the e_ident. It wasn't merging the architecture with the target architecture correctly. Differential Revision: https://reviews.llvm.org/D61659 llvm-svn: 360292
* [Reproducers] Flush files to disk periodicallyJonas Devlieghere2019-05-082-1/+4
| | | | | | | Periodically flush some of the data to disk. Although not perfect, this helps when the debugger crashes. llvm-svn: 360286
* [Reproducers] Fix unitialized pointerJonas Devlieghere2019-05-081-1/+1
| | | | | | | The FileCollector pointer in the FileSystem class wasn't initialized to nullptr during replay. llvm-svn: 360285
* [Docs] list command: lldb run <args>Jonas Devlieghere2019-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The run command is only an abbreviation for the more verbose process launch -- <args> but it works just as with GDB and therefore should be mentioned in the GDB to LLDB command map. For educational purposes I've not listed it as the first option on the LLDB side so that new LLDB user can, if they want, also know what the "native" way is for LLDB. Here's the help documentation for the run command in lldb which gives proof: > (lldb) help run > Launch the executable in the debugger. > > Syntax: run [<run-args>] > > Command Options Usage: > run [<run-args>] > > 'run' is an abbreviation for 'process launch -c /bin/sh --' Patch by: Konrad Kleine Differential revision: https://reviews.llvm.org/D61483 llvm-svn: 360269
* [DWARF] Centralize user_id <-> DWARFDIE conversionsPavel Labath2019-05-086-114/+55
| | | | | | | | | | | | | | | | | | | | | | | Summary: The logic for translating a user_id into a DWARFDIE was replicated in several places. This removes that redundancy and settles on a single implementation in SymbolFileDWARF. The reason for choosing that instead of DIERef was that we were always immediately converting the returned DIERef into a DWARFDIE anyway, which meant that one had to specify the SymbolFileDWARF argument twice (once to get the DIERef, and once to get the actual DIE). Also, passing a higher-level object (SymbolFileDWARF) into a lower-level one (DIERef) seemed like a less intuitive arrangement than doing things the other way around. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: tberghammer, jankratochvil, lldb-commits Differential Revision: https://reviews.llvm.org/D61648 llvm-svn: 360246
* [Docs] Fix incorrect heading and update titles.Jonas Devlieghere2019-05-083-9/+9
| | | | | | | | This patch fixes two incorrect headings in source.rst which caused it to show up on the homepage. I also updated the titles to have more sensible links there. llvm-svn: 360219
* [Docs] Re-order homepage: Download -> Build -> TestJonas Devlieghere2019-05-082-14/+17
| | | | | | I also reformatted some paragraphs to 80 cols. llvm-svn: 360218
* Propagate command interpreter errors from lldlbinitJonas Devlieghere2019-05-0811-8/+48
| | | | | | | | | | | | | | This patch ensures that we propagate errors coming from the lldbinit file trough the command/script interpreter. Before, if you did something like command script import syntax_error.py, and the python file contained a syntax error, lldb wouldn't tell you about it. This changes with the current patch: errors are now propagated by default. PS: Jim authored this change and I added testing. Differential revision: https://reviews.llvm.org/D61579 llvm-svn: 360216
* [Docs] Add timestampJonas Devlieghere2019-05-071-1/+1
| | | | llvm-svn: 360209
* [Expression] Remove unused dependencyAlex Langford2019-05-073-4/+1
| | | | | | | | | lldbExpression was linking against lldbPluginExpressionParserClang, and lldbPluginExpressionParserClang was linking against lldbExpression. There's no reason lldbExpression should need anything from lldbPluginExpressionParserClang, so let's remove that dependency. llvm-svn: 360208
* [Core] Remove unused dependenciesAlex Langford2019-05-071-2/+0
| | | | llvm-svn: 360193
* Disable eh-frame-dwarf-unwind.test on windowsPavel Labath2019-05-071-0/+1
| | | | | | | It fails on the windows bot. Disable until I can figure out what's the reason. llvm-svn: 360182
* [Host] Clean up dependencies of HostMacOSXObjCXXAlex Langford2019-05-071-4/+0
| | | | llvm-svn: 360178
* [Driver] Add command line option to allow loading local lldbinit file.Jonas Devlieghere2019-05-073-2/+13
| | | | | | | | | This patch adds a command line flag that allows lldb to load local lldbinit files. Differential revision: https://reviews.llvm.org/D61578 llvm-svn: 360172
* Fixup r360161Pavel Labath2019-05-072-3/+1
| | | | | | | | | Remove SymbolVendorMacOSX from the test, as this plugin is not available on non-mac platforms, and it does not seem to be necessary anyway. Declare inlined-functions.yaml as an input of the test in cmake. llvm-svn: 360169
* Make eh-frame-dwarf-unwind.test run on non-linux platformsPavel Labath2019-05-073-17/+10
| | | | | | | This was meant to be a part of r360158, but I forgot to squash the commits before pushing. llvm-svn: 360168
* PostfixExpression: Use signed integers in IntegerNodePavel Labath2019-05-074-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is necessary to support parsing expressions like ".cfa -16 + ^", as that format is used in breakpad STACK CFI expressions. Since the PDB expressions use the same parser, this change will affect them too, but I don't believe that should be a problem in practice. If PDBs do contain the negative values, it's very likely that they are intended to be parsed the same way, and if they don't, then it doesn't matter. In case that we do ever need to handle this differently, we can always make the parser behavior customizable, or just use a different parser. To make sure that the integer size is big enough for everyone, I switch from using a (unsigned) 32-bit integer to a 64-bit (signed) one. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D61311 llvm-svn: 360166
* Added missing files from 360071.Greg Clayton2019-05-073-0/+1179
| | | | llvm-svn: 360161
* RegisterContextLLDB: Push CFA value on DWARF stack when evaluating register ↵Pavel Labath2019-05-073-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | expressions Summary: This behavior is specified in the Section 6.4.2.3 (Register Rule instructions) of the DWARF4 spec. We were not doing that, which meant that any register rule which was relying on the cfa value being there was not evaluated correctly (it was aborted due to "out of bounds" access). I'm not sure how come this wasn't noticed before, but I guess this has something to do with the fact that dwarf unwind expressions are not used very often, and when they are, the situation is so complicated that the CFA is of no use. I noticed this when I started emitting dwarf expressions for the unwind information present in breakpad symbol files. Reviewers: jasonmolenda, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D61018 llvm-svn: 360158
* [lldb] [lit] Update constants in write Register testsMichal Gorny2019-05-078-256/+256
| | | | | | Update the constants used for XMM/YMM/ZMM registers to match read tests. llvm-svn: 360154
* [lldb] [lit] Fix Register tests to reference arrays via %0 and %1Michal Gorny2019-05-078-189/+180
| | | | | | | | Fix Register tests to reference memory access to arrays via %0 and %1, rather than via referencing %rax and %rbx directly. This fixes test build failures on 32-bit x86. llvm-svn: 360148
* [lldb] Add MacroQualified switch cases for r360109Krasimir Georgiev2019-05-071-0/+6
| | | | | | | | | | | | | | | | | | Summary: r360109 added a new enum case, causing lldb build to fail with several errors like: lldb/source/Symbol/ClangASTContext.cpp:4342:11: error: enumeration value 'MacroQualified' not handled in switch [-Werror,-Wswitch] switch (qual_type->getTypeClass()) { ^ This adds the missing switch cases. I'm not an lldb maintainer and just used my best judgement that it's probably expected that we break in these cases. Feel free to ping / revert / fix this change if this behavior is not appropriate. Reviewers: gribozavr Reviewed By: gribozavr Differential Revision: https://reviews.llvm.org/D61640 llvm-svn: 360146
* [Breakpoint] Remove unused dependencyAlex Langford2019-05-072-2/+0
| | | | | | | | | | The CPlusPlus Language plugin is unused in lldbBreakpoint. We should just remove it. A great follow up to this change would be to remove the dependency on the ObjC language plugin, but that is actually used and requires some refactoring. llvm-svn: 360105
* [Docs] Add remote.html redirectJonas Devlieghere2019-05-061-7/+8
| | | | | | | Add a redirect for the old remote.html page and sort the pages to make dding redirects easier in the future. llvm-svn: 360083
* [CMake] Remove lldbPluginSymbolVendorMacOSX to fix CMake buildJonas Devlieghere2019-05-061-1/+0
| | | | | | This should fix check-lldb-unit on the bots. llvm-svn: 360079
* [CMake] Remove inlined-functions.yamlJonas Devlieghere2019-05-061-1/+0
| | | | llvm-svn: 360078
* [Driver] Change the way we deal with local lldbinit files.Jonas Devlieghere2019-05-066-65/+30
| | | | | | | | | | | | | | | | Currently we have special handling for local lldbinit files in the driver. At the same time, we have an SB API named `SourceInitFileInCurrentWorkingDirectory` that does the same thing. This patch removes the special handling from the driver and uses the API instead. In addition to the obvious advantages of having one canonical way of doing things and removing code duplication, this change also means that the code path is the same for global and local lldb init files. Differential revision: https://reviews.llvm.org/D61577 llvm-svn: 360077
* Fix the cmake build by removing non-existant source fileReid Kleckner2019-05-061-1/+0
| | | | llvm-svn: 360076
* Revert xcode scheme changes that I didn't mean to check in.Greg Clayton2019-05-062-32/+4
| | | | llvm-svn: 360072
* Include inlined functions when figuring out a contiguous address rangeGreg Clayton2019-05-0624-139/+251
| | | | | | | | | | | | | | | | | | | | | | | Checking this in for Antonio Afonso: This diff changes the function LineEntry::GetSameLineContiguousAddressRange so that it also includes function calls that were inlined at the same line of code. My motivation is to decrease the step over time of lines that heavly rely on inlined functions. I have multiple examples in the code base I work that makes a step over stop 20 or mote times internally. This can easly had up to step overs that take >500ms which I was able to lower to 25ms with this new strategy. The reason the current code is not extending the address range beyond an inlined function is because when we resolve the symbol at the next address of the line entry we will get the entry line corresponding to where the original code for the inline function lives, making us barely extend the range. This then will end up on a step over having to stop multiple times everytime there's an inlined function. To check if the range is an inlined function at that line I also get the block associated with the next address and check if there is a parent block with a call site at the line we're trying to extend. To check this I created a new function in Block called GetContainingInlinedBlockWithCallSite that does exactly that. I also added a new function to Declaration for convinence of checking file/line named CompareFileAndLine. To avoid potential issues when extending an address range I added an Extend function that extends the range by the AddressRange given as an argument. This function returns true to indicate sucess when the rage was agumented, false otherwise (e.g.: the ranges are not connected). The reason I do is to make sure that we're not just blindly extending complete_line_range by whatever GetByteSize() we got. If for some reason the ranges are not connected or overlap, or even 0, this could be an issue. I also added a unit tests for this change and include the instructions on the test itself on how to generate the yaml file I use for testing. Differential Revision: https://reviews.llvm.org/D61292 llvm-svn: 360071
* Initialization: move InstructionEmulation to full initializationSaleem Abdulrasool2019-05-065-14/+54
| | | | | | | | The debug server does not need to use the instruction emulation. This helps reduce the size of the final lldb-server binary by another ~100K (~1% savings). llvm-svn: 360067
* [lldb] [lit] Use more readable consts and arrays in register read testsMichal Gorny2019-05-0612-490/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the constants used for r8/mm/xmm/ymm/zmm tests with something more readable to ease debugging in case of failures (0x00 0x01 ...). While at it, put the constants in array and copy them from memory to simplify inline asm. The original constants grew out of necessity. The xmm constants were 'weird' because they were intended to be different from mm constants (as that was necessary to catch NetBSD implementation bug). The ymm constants were made even weirded to not even partially collide with other xmm registers (not saying it made sense, just how it was done). Then, zmm constants were once again designed to avoid accidental collisions with xmm and ymm constants, and at the same the 16 extra registers required even more shuffling. The new constants are meant to be more user-readable, so that a mistake could be easily spotted. All of xmm, ymm and zmm tests use a sequence of {0x00 0x01 0x02 ...}, shifted by 1 for every register. This should provide enough uniquity, and space for future increase in number of registers. Since mm and r8..r15 are printed as uint64_t rather than byte-by-byte, they use 0x000102... As a result, on x86 endianness takes care of making mm different than xmm. The use of arrays is something I had to learn for zmm write tests. It avoids having to specify all the input values separately, and makes GCC happy about zmm-read test (it was rejected previously because of hitting a limit of 30 constraints). llvm-svn: 360041
* Merge GetCompileUnitAtOffset + GetCompileUnitContainingDIEOffsetJan Kratochvil2019-05-062-49/+27
| | | | | | | | | | | | | | | | These two methods are very similar and various refactorizations need to modify both similar ways. One could also just remove GetCompileUnitAtOffset and make GetCompileUnitContainingDIEOffset to also accept offset of the CU itself (currently it accepts only DIE offsets after the CU header). But that would be less safe regarding some internal sanity checking. Further code refactorization has been suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D61498 llvm-svn: 360038
* Revert r359949 "[clang] adding explicit(bool) from c++2a"Hans Wennborg2019-05-061-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused Clang to start erroring on the following: struct S {   template <typename = int> explicit S(); }; struct T : S {}; struct U : T {   U(); }; U::U() {} $ clang -c /tmp/x.cc /tmp/x.cc:10:4: error: call to implicitly-deleted default constructor of 'T' U::U() {}    ^ /tmp/x.cc:5:12: note: default constructor of 'T' is implicitly deleted because base class 'S' has no default constructor struct T : S {};            ^ 1 error generated. See discussion on the cfe-commits email thread. This also reverts the follow-ups r359966 and r359968. > this patch adds support for the explicit bool specifier. > > Changes: > - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. > - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. > - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. > - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. > - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. > - Test for Semantic and Serialization were added. > > This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. > Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. > > Patch by Tyker > > Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360024
* [DWARF] Reimplement/simplify DWARFUnit::GetIDPavel Labath2019-05-068-41/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The implementation of GetID used a relatively complicated algorithm, which returned some kind of an offset of the unit in some file (depending on the debug info flavour). The only thing this ID was used for was to enable subseqent retrieval of the unit from the SymbolFile. This can be made simpler if we just make the "ID" of the unit an index into the list of the units belonging to the symbol file. We already support indexed access to the units, so each unit already has a well "index" -- this just makes it accessible from within the unit. To make the distincion between "id" and "offset" clearer (and help catch any misuses), I also rename DWARFDebugInfo::GetCompileUnit (which accesses by offset) into DWARFDebugInfo::GetCompileUnitAtOffset. On its own, this only brings a minor simplification, but it enables further simplifications in the DIERef class (coming in a follow-up patch). Reviewers: JDevlieghere, clayborg, aprantl Subscribers: arphaman, jdoerfert, lldb-commits, tberghammer, jankratochvil Differential Revision: https://reviews.llvm.org/D61481 llvm-svn: 360014
* [test] Remove randomnessJonas Devlieghere2019-05-051-8/+3
| | | | | | | | This particular test fails once every so many runs on GreenDragon. Given that the randomness in the inferior isn't critical to the test, I removed it in the hopes that it is the cause of the flakiness. llvm-svn: 359992
* [lldb] [lit] Simplify general-purpose register testsMichal Gorny2019-05-054-61/+27
| | | | | | | | | Use output constraints for specific general-purpose registers in order to simplify the tests. They save us from having to manually put the values in correct registers, and reduce the number of registers needed as a result. llvm-svn: 359978
* [lldb] [lit] Fix more filename mismatches in Register testsMichal Gorny2019-05-052-2/+2
| | | | llvm-svn: 359977
* [lldb] Fix buildbot failure due to clang AST change.Nicolas Lesser2019-05-041-2/+6
| | | | | | | In r359949 several AST node constructors were modified without the corresponding change in lldb, which caused build failures. llvm-svn: 359966
* ExpressionParser: only force link MCJIT when neededSaleem Abdulrasool2019-05-032-5/+5
| | | | | | | | | | | This was added to support FreeBSD. The inclusion of this header increases the size of `lldb-server` due to MCJIT being forcefully preserved. Conditionalise the inclusion to shared builds of LLVM which will allow for MCJIT to be stripped if unnecessary when performing static linking of tools. This shaves off ~28% of the binary size for lldb-server when linked with gold using `-ffunction-sections` and `-fdata-sections`. llvm-svn: 359944
* Fixed some minor style issues in rLLDB359921 [NFC]Raphael Isemann2019-05-032-10/+10
| | | | | | | | Ran clang-format on the added test file and use the new StringRef comparison over the temporary ConstStrings. Also aligned the end of one of the code string literals. llvm-svn: 359931
* [test] Make check more strictJonas Devlieghere2019-05-031-2/+2
| | | | | | | Before this change the test would always pass if the path to the test contained the number 11 in it. Thanks to Ted for pointing this out. llvm-svn: 359930
* [lldb] Remove the 'www' folder.Jonas Devlieghere2019-05-031679-372037/+0
| | | | | | | Now that the new website is live and everything is generated from the repository, we don't need the www folder anymore. llvm-svn: 359929
* [Alias] Add 're' alias for registerJonas Devlieghere2019-05-032-1/+7
| | | | | | | | | | This patch makes `re` an alias for `register`. Currently `re<TAB>` gives you the choice between `register` and `reproducer`. Given that you use `register` a lot more often, it should win for the common substring. Differential revision: https://reviews.llvm.org/D61469 llvm-svn: 359927
* Make lldb-mi optional and change how we deal with missing tools in litJonas Devlieghere2019-05-034-8/+2
| | | | | | | | | We don't need the variables in lit, we can use the capabilities to check if the utility exists. Differential revision: https://reviews.llvm.org/D61533 llvm-svn: 359926
* Supply a default implementation of IsRuntimeSupportValue.Adrian Prantl2019-05-032-1/+4
| | | | | | Thanks to Pavel for pointing this out. llvm-svn: 359925
* Fix for ambiguous lookup in expressions between local variable and namespaceShafik Yaghmour2019-05-038-13/+144
| | | | | | | | | Summary: In an Objective-C context a local variable and namespace can cause an ambiguous name lookup when used in an expression. The solution involves mimicking the existing C++ solution which is to add local using declarations for local variables. This causes a different type of lookup to be used which eliminates the namespace during acceptable results filtering. Differential Revision: https://reviews.llvm.org/D59960 llvm-svn: 359921
OpenPOWER on IntegriCloud