summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert FileSystem::Open() to return Expected<FileUP>Lawrence D'Anna2019-09-2626-208/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch converts FileSystem::Open from this prototype: Status Open(File &File, const FileSpec &file_spec, ...); to this one: llvm::Expected<std::unique_ptr<File>> Open(const FileSpec &file_spec, ...); This is beneficial on its own, as llvm::Expected is a more modern and recommended error type than Status. It is also a necessary step towards https://reviews.llvm.org/D67891, and further developments for lldb_private::File. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67996 llvm-svn: 373003
* SystemInitializer: Define macros for experimental targets tooPavel Labath2019-09-262-0/+4
| | | | llvm-svn: 372998
* [lldb] Code cleanup: Simplify SBCommandReturnObjectJan Kratochvil2019-09-262-84/+51
| | | | | | | | | | | | A simplification for D67589. m_opaque_up can never be nullptr (unless one calls a ctor with nullptr or one uses SetLLDBObjectPtr with nullptr). Also protected SetLLDBObjectPtr is not used anywhere (I haven't found it would ever be used). Differential revision: https://reviews.llvm.org/D68083 llvm-svn: 372976
* [lldb][modern-type-lookup] Fix crash when activating modern-type-lookup on LinuxRaphael Isemann2019-09-261-2/+1
| | | | | | | There is no ClangModulesDeclVendor on Linux so that cast is triggering an assert. Let's just remove it as it just casts the type to itself. llvm-svn: 372974
* [lldb][www] Update bot linksRaphael Isemann2019-09-261-2/+2
| | | | llvm-svn: 372971
* [lldb][modern-type-lookup] Add test for using the ClangModulesDeclVendorRaphael Isemann2019-09-263-0/+36
| | | | llvm-svn: 372965
* Don't stop execution in batch mode when process stops with SIGINT or SIGSTOPTatyana Krasnukha2019-09-266-70/+91
| | | | | | | | Summary: Usually, SIGINT and SIGSTOP don't imply a crash, e.g. SIGSTOP is sent on process launch and attach on some platforms. Differential Revision: https://reviews.llvm.org/D67776 llvm-svn: 372961
* SystemInitializer: Use Targets.def to selectively initialize ABI pluginsPavel Labath2019-09-264-122/+68
| | | | | | | | | | | This avoids having to define additional macros in the cmake file, and and also makes the logic in the cpp files more compact. It is also easily extendible to other plugin types (instruction emulation?) that should only be initialized if the corresponding llvm target is built. Thanks to Ilya Birukov for pointing me to this file. llvm-svn: 372952
* [lldb][NFC] Use AppendEmptyArgument in CompletionRequest constructorRaphael Isemann2019-09-261-7/+3
| | | | | | | | We now have a utility function for this purpose. (Also fixing the typo in the related comment while I'm at it.) llvm-svn: 372946
* [Dwarf] Fix switch cases that take an dw_tag_t.Jonas Devlieghere2019-09-253-0/+10
| | | | | | Now that dw_tag_t is an enum, a default case is required. llvm-svn: 372920
* [lit] Do a better job at parsing unsupported tests.Jonas Devlieghere2019-09-251-0/+5
| | | | | | | | | | | | | When all the tests run by dotest are unsupported, it still reports RESULT: PASSED which we translate to success for lit. We can better report the status as unsupported when we see that there are unsupported tests but no passing tests. This will not affect the situation where there are failures or unexpected passes, because those report a non-zero exit code. Differential revision: https://reviews.llvm.org/D68039 llvm-svn: 372914
* [lldb] Excludes private headers from SWIG dependency.Haibo Huang2019-09-251-0/+6
| | | | | | | | | | | | Reviewers: xiaobai Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68040 llvm-svn: 372905
* [Mangle] Add flag to asm labels to disable '\01' prefixingVedant Kumar2019-09-251-2/+2
| | | | | | | | | | | | | | LLDB synthesizes decls using asm labels. These decls cannot have a mangle different than the one specified in the label name. I.e., the '\01' prefix should not be added. Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS. rdar://45827323 Differential Revision: https://reviews.llvm.org/D67774 llvm-svn: 372903
* [CMake] Add the system debugserver to lldb-test-deps.Jonas Devlieghere2019-09-251-0/+1
| | | | | | | When using the system debugserver we create a target to copy it over. This target has to be added to lldb-test-deps. llvm-svn: 372901
* [CMake] Run the lldb-server tests with system debugserver.Jonas Devlieghere2019-09-251-1/+1
| | | | | | | Now that we no longer build debugserver when LLDB_USE_SYSTEM_DEBUGSERVER is set, we have to change the logic for testing lldb-server. llvm-svn: 372900
* [lldb] Move swig call from python code to cmakeHaibo Huang2019-09-253-629/+24
| | | | | | | | | | | | | | Summary: Elimiates lots of unused code. Reviewers: labath, mgorny Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68007 llvm-svn: 372895
* [Docs] Document forwarding arguments with litJonas Devlieghere2019-09-251-0/+8
| | | | | | Explain how to forward arguments to dotest.py from lit. llvm-svn: 372894
* [Dwarf] Make dw_tag_t a typedef for llvm::dwarf::Tag instead of uint16_t.Jonas Devlieghere2019-09-257-11/+13
| | | | | | | | | | | | Currently dw_tag_t is a typedef for uint16_t. This patch changes makes dw_tag_t a typedef for llvm::dwarf::Tag. This enables us to use the full power of the DWARF utilities in LLVM without having to do the cast every time. With this approach, we only have to do the cast when reading the ULEB value. Differential revision: https://reviews.llvm.org/D68005 llvm-svn: 372891
* Modernize Makefile.Adrian Prantl2019-09-251-1/+1
| | | | llvm-svn: 372890
* [lldb][modern-type-lookup] Add two basic tests for modern-type-lookupRaphael Isemann2019-09-256-0/+69
| | | | | | | | | | | | | | | | | | The story so far: LLDB's modern type lookup mode has no (as in, 0%) test coverage. It was supposed to be tested by hardcoding the default to 'true' and then running the normal LLDB tests, but to my knowledge no one is doing that. As a around 130 tests seem to fail with this mode enabled, we also can't just enable it globally for now. As we touch the surrounding code all the time and also want to refactor parts of it, we should be a bit more ambitious with our testing efforts. So this patch adds two basic tests that enable this mode and do some basic expression parsing which should hopefully be basic enough to not break anywhere but still lets us know if this mode works at all (i.e. setting up the ExternalASTMerger in LLDB, using its basic import functionality to move declarations around and do some lookups). llvm-svn: 372869
* Have ABI plugins vend llvm MCRegisterInfo dataPavel Labath2019-09-2535-76/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I was recently surprised to learn that there is a total of 2 (two) users of the register info definitions contained in the ABI plugins. Yet, the defitions themselves span nearly 10kLOC. The two users are: - dwarf expression pretty printer - the mechanism for augmenting the register info definitions obtained over gdb-remote protocol (AugmentRegisterInfoViaABI) Both of these uses need the DWARF an EH register numbers, which is information that is already available in LLVM. This patch makes it possible to do so. It adds a GetMCRegisterInfo method to the ABI class, which every class is expected to implement. Normally, it should be sufficient to obtain the definitions from the appropriate llvm::Target object (for which I provide a utility function), but the subclasses are free to construct it in any way they deem fit. We should be able to always get the MCRegisterInfo object from llvm, with one important exception: if the relevant llvm target was disabled at compile time. To handle this, I add a mechanism to disable the compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD cmake setting. This ensures all our existing are able to create their MCRegisterInfo objects. The new MCRegisterInfo api is not used yet, but the intention is to make use of it in follow-up patches. Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits Differential Revision: https://reviews.llvm.org/D67965 llvm-svn: 372862
* [lldb][NFC] Remove CompletionRequest::GetCursorArgument and ↵Raphael Isemann2019-09-253-11/+4
| | | | | | | | | | GetRawLineUntilCursor They both return the same result as another function (GetCursorArgumentPrefix and GetRawLine). They were only added because the old API allowed to look (in theory) behind the cursor position which is no longer possible. llvm-svn: 372861
* [lldb][NFC] Add CompletionRequest::AppendEmptyArgumentRaphael Isemann2019-09-254-21/+14
| | | | | | | | | This is the only legitimate use we currently have for modifying a CompletionRequest. Add a utility function for this purpose and remove the remaining setters which go against the idea of having an immutable CompletionRequest. llvm-svn: 372858
* [lldb][NFC] Remove useless cursor shifting in Options::HandleOptionCompletionRaphael Isemann2019-09-251-4/+1
| | | | | | | | The cursor position is always at the end of the current argument (as the argument cut off after the cursor position). So this code is a no-op and can be removed. llvm-svn: 372851
* Revert r372788 "Host: use the platform identifiers from LLVM (NFC)"Hans Wennborg2019-09-251-5/+4
| | | | | | | | | | | | | | | | > Use symbolic constants for the platform identifiers rather than replicating them > locally. This broke the build of LLDB on Windows, see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9182 which fails with e.g. E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C2059: syntax error: 'constant' E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C3805: 'constant': unexpected token, expected either '}' or a ',' E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(128): error C2059: syntax error: 'constant' ... llvm-svn: 372847
* [lldb] [test] Add NetBSD to XFAIL list for thread_local testMichal Gorny2019-09-251-1/+2
| | | | llvm-svn: 372840
* [lldb] Test data formatters for empty stringsRaphael Isemann2019-09-254-1/+18
| | | | llvm-svn: 372837
* [lldb][NFC] Refactor and document *DumpToStreamOptionsRaphael Isemann2019-09-251-63/+38
| | | | | | Those two classes were mostly copy-pasted. llvm-svn: 372836
* [lldb] [cmake] Fix installing Python modules on systems using /usr/libMichal Gorny2019-09-252-10/+13
| | | | | | | | | | | | | | | Fix installing Python modules on systems that use /usr/lib for Python while installing other libraries in /usr/lib64. Rewrite CMake logic to query correct directories from Python, similarly to how prepare_binding_Python.py does it. Furthermore, change the regex used in get_relative_lib_dir.py to allow 'lib' without suffix. I think that the code can be further improved but I'd like to take this enterprise in smaller steps in case one of them breaks something. Differential Revision: https://reviews.llvm.org/D67890 llvm-svn: 372835
* [lldb][NFC] Remove unused method chaining from ↵Raphael Isemann2019-09-251-109/+27
| | | | | | | | | Read[Buffer/String]AndDumpToStreamOptions All this code isn't used anywhere and method chaining isn't really useful for some option struct. llvm-svn: 372834
* [lldb][NFC] Use default member initializers in ReadBufferAndDumpToStreamOptionsRaphael Isemann2019-09-251-12/+8
| | | | llvm-svn: 372830
* [lldb] Remove -nostdlib++ flag from import-std-module/sysroot testRaphael Isemann2019-09-251-1/+1
| | | | | | | | That flag was introduced in Clang 6.0, so this made the test fail with Clang <= 5.0. As it only influences linking builtin libraries like -m which aren't relevant for this test, we can drop this flag. llvm-svn: 372827
* [lldb] Fix undefined behavior when having fixits in undefined top level exprsRaphael Isemann2019-09-251-1/+4
| | | | | | | | In top level expressions, we don't have a m_source_code and we don't need to change the source bounds (as no wrapping happend there). Fixes the test on the sanitizer bot. llvm-svn: 372817
* [lldb][NFC] Refactor TestCallBuiltinFunctionRaphael Isemann2019-09-251-11/+4
| | | | | | Using asserts doesn't print a useful error message in case this test fails. llvm-svn: 372815
* [Make] Revert some changes from r372795.Jonas Devlieghere2019-09-252-4/+4
| | | | | | These changes cause the corresponding test to fail on the Linux bots. llvm-svn: 372801
* remove unused method ResetOutputFileHandle()Jonas Devlieghere2019-09-254-11/+0
| | | | | | | | | | | ResetOutputFileHandle() isn't being used by anything. Also it's using FILE*, which is something we should be doing less of. Remove it. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D68001 llvm-svn: 372800
* [CMake] Don't modify LLVM_DISTRIBUTION_COMPONENTS if it's not setJonas Devlieghere2019-09-251-2/+4
| | | | | | | Don't try to remove debugserver from LLVM_DISTRIBUTION_COMPONENTS if the list is not set. llvm-svn: 372799
* [Documentation] Expand on testing variants.Jonas Devlieghere2019-09-251-7/+54
| | | | | | | | | | | | The testing documentation appears to be from an era when the only kind of tests were the lldbsuite python tests. This patch adds a short description of the unittests and LIT tests and how to run them. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67943 llvm-svn: 372797
* Canonicalize variable usage in testsuite MakefilesAdrian Prantl2019-09-25146-219/+264
| | | | | | | | | | | | This test streamlines our use of variables that are expected by Makefile.rules throughout the test suite. Mostly it replaced potentially dangerous overrides and updates of variables like CFLAGS with safe assignments to variables reserved for this purpose like CFLAGS_EXTRAS. Differential Revision: https://reviews.llvm.org/D67984 llvm-svn: 372795
* [CMake] Don't try to install the system debugserver.Jonas Devlieghere2019-09-251-0/+4
| | | | | | | The custom target for the system debugserver has no install target, so we need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list. llvm-svn: 372793
* Host: use the platform identifiers from LLVM (NFC)Saleem Abdulrasool2019-09-241-4/+5
| | | | | | | Use symbolic constants for the platform identifiers rather than replicating them locally. llvm-svn: 372788
* [CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVERJonas Devlieghere2019-09-247-5/+13
| | | | | | | | | | | | | | | | r366433 broke support for the system debugserver. Although the change was well-intended, it (presumably) unintentionally removed the logic to copy over the debugserver. As a result, even with LLDB_USE_SYSTEM_DEBUGSERVER enabled, we ended up building, signing and using the just-built debugserver. This patch partially recovers the old behavior: when LLDB_USE_SYSTEM_DEBUGSERVER is set we don't build debugserver and just copy over the system one. Differential revision: https://reviews.llvm.org/D67991 llvm-svn: 372786
* [unittest] Skip the socket tests if we $TMPDIR is too long.Jonas Devlieghere2019-09-241-4/+8
| | | | | | | | | | | | | Adrian added a sanity check to the socket tests to ensure the $TMPDIR is not too long for a socket. While this is great for diagnosing the problem it doesn't really solve the problem for environment where you have no control over that variable such as in CI. I propose to just skip the test in that case similar to what we do for tests that rely on targets that are not currently build, etc. Differential revision: https://reviews.llvm.org/D67972 llvm-svn: 372774
* [NFC] Fix typo in the "kind" description for the software single-step breakpointTatyana Krasnukha2019-09-241-1/+1
| | | | llvm-svn: 372763
* [lldb] [Process/NetBSD] Fix handling LLDB_INVALID_SIGNAL_NUMBERMichal Gorny2019-09-241-2/+4
| | | | | | | | | Fix NativeProcessNetBSD::Resume() to handle LLDB_INVALID_SIGNAL_NUMBER correctly. Fixes breakage caused by r372090 and r372300. I have major rewrite of that function pending; however, the fixes to gdb-remote were committed prior to that. llvm-svn: 372755
* Enhance SymbolFileDWARF::ParseDeclsForContext performancePavel Labath2019-09-245-34/+36
| | | | | | | | | | | | | | | | | | | This implements DWARFASTParserClang::EnsureAllDIEsInDeclContextHaveBeenParsed so as to provide a faster way to ensure all DIEs linked to a certain declaration context have been parsed. Currently, we rely on SymbolFileDWARF::ParseDeclsForContext calling DWARFASTParserClang::GetDIEForDeclContext, and only then DWARFASTParserClang::GetDeclForUIDFromDWARF. This change shortcuts that logic and removes redundant calls to DWARFASTParserClang:: GetClangDeclForDIE by deleting DIEs from the m_decl_ctx_to_die map once they have been parsed. Differential Revision: https://reviews.llvm.org/D67760 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 372744
* [LLDB] Add tests for PECOFF arm architecture identificationMartin Storsjo2019-09-244-2/+176
| | | | | | | | | | | | | | | Add a test case for the change from SVN r372657, and for the preexisting ARM identification. Add a missing ArchDefinitionEntry for PECOFF/arm64, and tweak the ArmNt case to set the architecture to armv7 (ArmNt never ran on anything lower than that). (This avoids a case where ArchSpec::MergeFrom would override the arch from arm to armv7 and ArchSpec::CoreUpdated would reset the OS to unknown at the same time.) Differential Revision: https://reviews.llvm.org/D67951 llvm-svn: 372741
* [LLDB] [test] Allow differing order of some matchesMartin Storsjo2019-09-241-2/+2
| | | | | | | | | These can appear in a different order depending on the relative layout of the source and build trees. Differential Revision: https://reviews.llvm.org/D67953 llvm-svn: 372740
* [LLDB] [test] Add a few missing cases of REQUIRES: pythonMartin Storsjo2019-09-242-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D67952 llvm-svn: 372739
* [LLDB] Fix typo in RegisterContextDarwin_arm64Martin Storsjo2019-09-241-1/+1
| | | | | | | | | In these cases, the register number should be calculated from fpu_d0, not fpu_s0. Differential Revision: https://reviews.llvm.org/D67892 llvm-svn: 372738
OpenPOWER on IntegriCloud