summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* [Symbol] Decouple clang from DeclVendorAlex Langford2019-08-2310-10/+69
| | | | | | | | | | Summary: This removes DeclVendor's dependency on clang (and ClangASTContext). DeclVendor has no need to know about specific TypeSystems. Differential Revision: https://reviews.llvm.org/D66628 llvm-svn: 369735
* [LLDB] Address post-commit code review feedback.Jonas Devlieghere2019-08-232-4/+2
| | | | | | | This patch addresses Adrian McCarthy's code review feedback in https://reviews.llvm.org/D66447 llvm-svn: 369731
* Add missing dot.Adrian Prantl2019-08-221-1/+1
| | | | llvm-svn: 369712
* Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2227-198/+219
| | | | | | | | | | | | | | | | | | | This patch is also motivated by the Swift branch and is effectively NFC for the single-TypeSystem llvm.org branch. In multi-language projects it is extremely common to have, e.g., a Clang type and a similarly-named rendition of that same type in another language. When searching for a type It is much cheaper to pass a set of supported languages to the SymbolFile than having it materialize every result and then rejecting the materialized types that have the wrong language. Differential Revision: https://reviews.llvm.org/D66546 <rdar://problem/54471165> This reapplies r369690 with a previously missing constructor for LanguageSet. llvm-svn: 369710
* TestAppleSimulatorOSType: Pass the --standalone argument to simctlFrederic Riss2019-08-221-1/+1
| | | | | | | | It looks like running without this argument was supported for legacy reasons, but a Xcode 11 beta made the argument mandatory for our usecase. llvm-svn: 369709
* Revert [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-1/+0
| | | | | | | | This reverts r369684 (git commit cc62e38d258f414c196b566374c606e83a85a034) Adding a declaration doesn't appear to be a sufficient fix. llvm-svn: 369706
* Revert Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2225-201/+198
| | | | | | This reverts r369690 (git commit aa3a564efa6b5fff2129f81a4041069a0233168f) llvm-svn: 369702
* Rename lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp toAdrian Prantl2019-08-222-1/+1
| | | | | | lldb/source/Interpreter/OptionValueFileSpecList.cpp (NFC) llvm-svn: 369699
* Rename lldb/source/Interpreter/OptionValueFileSpecLIst.cpp toAdrian Prantl2019-08-222-2/+2
| | | | | | lldb/source/Interpreter/OptionValueFileSpecListTmp.cpp (NFC) llvm-svn: 369698
* Add missing includeAdrian Prantl2019-08-221-0/+1
| | | | llvm-svn: 369692
* Add missing includeAdrian Prantl2019-08-221-0/+1
| | | | llvm-svn: 369691
* Extend FindTypes with CompilerContext to allow filtering by language.Adrian Prantl2019-08-2225-198/+201
| | | | | | | | | | | | | | | | | This patch is also motivated by the Swift branch and is effectively NFC for the single-TypeSystem llvm.org branch. In multi-language projects it is extremely common to have, e.g., a Clang type and a similarly-named rendition of that same type in another language. When searching for a type It is much cheaper to pass a set of supported languages to the SymbolFile than having it materialize every result and then rejecting the materialized types that have the wrong language. Differential Revision: https://reviews.llvm.org/D66546 <rdar://problem/54471165> llvm-svn: 369690
* [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-0/+1
| | | | | | | | The evaluation context isn't guaranteed to have this declaration. Fixes "error: use of undeclared identifier 'malloc_get_all_zones'" bugs. llvm-svn: 369684
* Remove redundant curly braces.Adrian Prantl2019-08-222-3/+3
| | | | llvm-svn: 369670
* Doxygenify comments.Adrian Prantl2019-08-221-279/+297
| | | | llvm-svn: 369669
* [lldb] Remove ')' to fix the buildRaphael Isemann2019-08-221-1/+1
| | | | | | That ')' slipped in by accident in the reformatting commit. llvm-svn: 369660
* [lldb] Fix `TestDataFormatterStdList` regressionJan Kratochvil2019-08-221-7/+13
| | | | | | | | | | | | | | | | Since D66174 I see failures of TestDataFormatterStdList in about 50% of runs on Fedora 30 x86_64 libstdc++. I have found out that LLDB internally expects these RegularExpressions to be matched in their alphabetical order: ^std::(__cxx11::)?list<.+>(( )?&)?$ ^std::__[[:alnum:]]+::list<.+>(( )?&)?$ But since D66174 they are sometimes matched in reverse order. In fact it was only some luck it worked before as there is internally std::map<lldb::RegularExpressionSP, FormatterImpl> (FormattersContainer). Differential Revision: https://reviews.llvm.org/D66398 llvm-svn: 369655
* [lldb][NFC] Fix indentation in CommandObjectProcessRaphael Isemann2019-08-221-9/+9
| | | | llvm-svn: 369652
* [lldb][NFC] Add test for target stop-hook disable/enable/deleteRaphael Isemann2019-08-221-5/+28
| | | | llvm-svn: 369646
* [lldb][NFC] Remove unused return value from HandleOptionArgumentCompletionRaphael Isemann2019-08-224-24/+12
| | | | llvm-svn: 369635
* [lldb][NFC] NFC cleanup for the completion codeRaphael Isemann2019-08-228-121/+121
| | | | llvm-svn: 369632
* [lldb][NFC] Remove dead code that is supposed to handle invalid command optionsRaphael Isemann2019-08-2227-217/+82
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently have a bunch of code that is supposed to handle invalid command options, but all this code is unreachable because invalid options are already handled in `Options::Parse`. The only way we can reach this code is when we declare but then not implement an option (which will be made impossible with D65386, which is also when we can completely remove the `default` cases). This patch replaces all this code with `llvm_unreachable` to make clear this is dead code that can't be reached. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66522 llvm-svn: 369625
* [lldb][NFC] Remove WordComplete mode, make result array indexed from 0 and ↵Raphael Isemann2019-08-2257-637/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove any undocumented/redundant return values Summary: We still have some leftovers of the old completion API in the internals of LLDB that haven't been replaced by the new CompletionRequest. These leftovers are: * The return values (int/size_t) in all completion functions. * Our result array that starts indexing at 1. * `WordComplete` mode. I didn't replace them back then because it's tricky to figure out what exactly they are used for and the completion code is relatively untested. I finally got around to writing more tests for the API and understanding the semantics, so I think it's a good time to get rid of them. A few words why those things should be removed/replaced: * The return values are really cryptic, partly redundant and rarely documented. They are also completely ignored by Xcode, so whatever information they contain will end up breaking Xcode's completion mechanism. They are also partly impossible to even implement as we assign negative values special meaning and our completion API sometimes returns size_t. Completion functions are supposed to return -2 to rewrite the current line. We seem to use this in some untested code path to expand the history repeat character to the full command, but I haven't figured out why that doesn't work at the moment. Completion functions return -1 to 'insert the completion character', but that isn't implemented (even though we seem to activate this feature in LLDB sometimes). All positive values have to match the number of results. This is obviously just redundant information as the user can just look at the result list to get that information (which is what Xcode does). * The result array that starts indexing at 1 is obviously unexpected. The first element of the array is reserved for the common prefix of all completions (e.g. "foobar" and "footar" -> "foo"). The idea is that we calculate this to make the life of the API caller easier, but obviously forcing people to have 1-based indices is not helpful (or even worse, forces them to manually copy the results to make it 0-based like Xcode has to do). * The `WordComplete` mode indicates that LLDB should enter a space behind the completion. The idea is that we let the top-level API know that we just provided a full completion. Interestingly we `WordComplete` is just a single bool that somehow represents all N completions. And we always provide full completions in LLDB, so in theory it should always be true. The only use it currently serves is providing redundant information about whether we have a single definitive completion or not (which we already know from the number of results we get). This patch essentially removes `WordComplete` mode and makes the result array indexed from 0. It also removes all return values from all internal completion functions. The only non-redundant information they contain is about rewriting the current line (which is broken), so that functionality was moved to the CompletionRequest API. So you can now do `addCompletion("blub", "description", CompletionMode::RewriteLine)` to do the same. For the SB API we emulate the old behaviour by making the array indexed from 1 again with the common prefix at index 0. I didn't keep the special negative return codes as we either never sent them before (e.g. -2) or we didn't even implement them in the Editline handler (e.g. -1). I tried to keep this patch minimal and I'm aware we can probably now even further simplify a bunch of related code, but I would prefer doing this in follow-up NFC commits Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66536 llvm-svn: 369624
* [debugserver] Switch back to std::once_flagJonas Devlieghere2019-08-221-1/+1
| | | | | | | We cannot use llvm::once_flag in debugserver because doesn't link against llvm. llvm-svn: 369621
* [lldb] Replace std::once_flag with llvm::once_flag.Davide Italiano2019-08-222-2/+3
| | | | | | | | | | | | | | | | Summary: The former seems like it's not working on some platforms. All the other uses use `llvm::`, so, let's change for consistency. Reviewers: jasonmolenda, friss Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66566 llvm-svn: 369618
* [FormatManage] Fix the format info orderJonas Devlieghere2019-08-221-2/+3
| | | | | | | The format info entries need to match the order of the enum entries. This should fix the two failing data-formatter tests. llvm-svn: 369617
* [FormatManager] Add static_assert to keep formats in sync.Jonas Devlieghere2019-08-221-1/+5
| | | | | | | | This adds a static assert that ensures that there's a format info entry for every format enum value. This should prevent others from making the same mistake I made and Jason kindly fixed in r369611. (Thanks!) llvm-svn: 369614
* The g_format_infos table needs to be updated in concert with theJason Molenda2019-08-221-0/+1
| | | | | | | | | enum Format entries; else we can crash in a place like FormatManager::GetFormatAsCString(). We should add bounds checks to prevent this more reliably, but for tonight I'm just adding this entry to keep an address-sanitizer test run working. llvm-svn: 369611
* [test] Update test so it matches the Windows outputJonas Devlieghere2019-08-211-3/+3
| | | | llvm-svn: 369595
* When building file without debug info, include the architectureJason Molenda2019-08-211-1/+5
| | | | | | setting in the cflags on Darwin systems. llvm-svn: 369584
* Add char8_t support (C++20)Jonas Devlieghere2019-08-219-4/+129
| | | | | | | | | | | | This patch adds support for the char8_t type introduced in C++20 char8_t. The original patch was submitted by James Blachly on the LLDB mailing list [1]. I modified the patch a bit and added a test. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html Differential revision: https://reviews.llvm.org/D66447 llvm-svn: 369582
* Generalize FindTypes with CompilerContext to support fuzzy lookupAdrian Prantl2019-08-2119-71/+169
| | | | | | | | | | | | | | | This patch generalizes the FindTypes with CompilerContext interface to support looking up a type of unknown kind by name, as well as looking up a type inside an unspecified submodule. These features are motivated by the Swift branch, but are fully tested via unit tests and lldb-test on llvm.org. Specifically, this patch adds an AnyModule and an AnyType CompilerContext kind. Differential Revision: https://reviews.llvm.org/D66507 rdar://problem/54471165 llvm-svn: 369555
* [lldb][NFC] Merge multiple TestApropos.pyRaphael Isemann2019-08-212-26/+10
| | | | | | That's cleaner and makes lldb-dotest no longer fail due to conflicting names. llvm-svn: 369530
* [lldb] Add tests for 'settings remove' and fix error message typosRaphael Isemann2019-08-212-3/+42
| | | | llvm-svn: 369524
* Recommit "Minidump/Windows: Fix module lookup""Pavel Labath2019-08-214-0/+69
| | | | | | | | | | | | | | | | | | | | | | | This recommits r368416, which was reverted in r368838 because of test failures under ASAN. These have been dealt with by llvm r369370. The original commit message was: When opening a minidump, we were failing to find an executable because we were searching for i386-unknown-windows, whereas we recognize the pe/coff files as i386-pc-windows. This fixes the triple computation code in the minidump parser to match pe/coff, and adds an appropriate test. NB: I'm not sure setting the vendor to "pc" is really correct for arm(64) windows, but right now that seems to match what we do in the pe/coff case (ArchSpec.cpp:935). Reviewers: clayborg, amccarth Subscribers: javed.absar, kristof.beyls, rnk, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D65955 llvm-svn: 369523
* Fix two compiler warningsPavel Labath2019-08-212-1/+3
| | | | llvm-svn: 369522
* [lldb] Add tests for setting completions and enable 'settings remove' completionRaphael Isemann2019-08-212-0/+20
| | | | llvm-svn: 369521
* [lldb][NFC] Add tests for register commandRaphael Isemann2019-08-211-0/+13
| | | | llvm-svn: 369513
* [lldb][NFC] Add tests for invalid command invocationsRaphael Isemann2019-08-216-0/+93
| | | | llvm-svn: 369506
* Fix an unused variable warning in ClangASTContext.cppPavel Labath2019-08-211-2/+1
| | | | llvm-svn: 369503
* Properly EXCLUDE_FROM_ALL the testing support libraryPavel Labath2019-08-211-1/+1
| | | | | | | | | | The EXCLUDE_FROM_ALL variable is used by add_llvm_library, but lldb does not use that function (it uses llvm_add_library :P). Instead, set the directory property with the same name directly. This should fix standalone builds against an llvm install tree. llvm-svn: 369502
* [Symbol] Remove unused clang headers from TypeAlex Langford2019-08-212-4/+0
| | | | llvm-svn: 369494
* [NFC] Return llvm::StringRef from StringExtractor::GetStringRef.Jonas Devlieghere2019-08-219-81/+71
| | | | | | | | | | This patch removes the two variant of StringExtractor::GetStringRef that return (non-)const references to std::string. The non-const one was being abused to reinitialize the StringExtractor and its uses are replaced by calls to the copy asignment operator. The const variant was refactored to return an actual llvm::StringRef. llvm-svn: 369493
* [NFC] Remove unused function GetHexWithFixedSizeJonas Devlieghere2019-08-214-68/+8
| | | | | | | | The implementation of this function was obviously incorrect, as the result variable was never used. This led me to check if it was actually used anywhere, which came back negative. llvm-svn: 369492
* [NFC] Simplify codeJonas Devlieghere2019-08-211-17/+13
| | | | | | This simplifies the code and updates the comments. llvm-svn: 369491
* [NFC] Remove lldb_utility namespace.Jonas Devlieghere2019-08-2111-65/+44
| | | | | | | While generating the Doxygen I noticed this lone namespace that has one class and one function in it. This moves them into lldb_private. llvm-svn: 369485
* Update a few tests that may change the platform to save & restoreJason Molenda2019-08-214-4/+31
| | | | | | | | | | | the platform in the setUp/tearDown methods. I want to migrate the re-instatement of the correct plaform to the setUp base method but haven't had time to look at that yet, so I want to land this handful of fixes until I get to it. Differential revision: https://reviews.llvm.org/D66331 llvm-svn: 369484
* [Doxygen] Document private class members.Jonas Devlieghere2019-08-211-1/+1
| | | | | | | Given that the C++ documentation is meant for LLDB developers it makes sense to include private class members in the output. llvm-svn: 369479
* [dotest] Don't set the DWARF version override in CFLAGS_EXTRA.Jonas Devlieghere2019-08-202-6/+5
| | | | | | | | We cannot override the DWARF version in the CFLAGS_EXTRA because they are used by tests that explicitly build without debug info. Instead, we pass them through the regular CFLAGS. llvm-svn: 369477
* [NFC] Fix -Wdocumentation warnings in Utility.Jonas Devlieghere2019-08-207-80/+61
| | | | | | | | This patch fixes a bunch of -Wdocumentation warnings in Utility. I'm sure there are still a bunch outdated comments left, but this fixes the most flagrant inconsistencies that the compiler understands. llvm-svn: 369461
OpenPOWER on IntegriCloud