summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [lldb] Also force posix paths in CppModuleConfigurationTestRaphael Isemann2019-09-241-1/+1
| | | | llvm-svn: 372737
* [lldb][NFC] Use default member initializers in ReadStringAndDumpToStreamOptionsRaphael Isemann2019-09-241-16/+10
| | | | llvm-svn: 372736
* [lldb] Use convert_to_slash in CppModuleConfigurationRaphael Isemann2019-09-241-3/+3
| | | | | | That's what we actually want to do. Might fix the Windows bot. llvm-svn: 372729
* [lldb][NFC] Use llvm::StringRef in formatters::NSStringSummaryProviderRaphael Isemann2019-09-241-11/+11
| | | | llvm-svn: 372724
* [lldb] Decouple importing the std C++ module from the way the program is ↵Raphael Isemann2019-09-2462-203/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiled Summary: At the moment, when trying to import the `std` module in LLDB, we look at the imported modules used in the compiled program and try to infer the Clang configuration we need from the DWARF module-import. That was the initial idea but turned out to cause a few problems or inconveniences: * It requires that users compile their programs with C++ modules. Given how experimental C++ modules are makes this feature inaccessible for many users. Also it means that people can't just get the benefits of this feature for free when we activate it by default (and we can't just close all the associated bug reports). * Relying on DWARF's imported module tags (that are only emitted by default on macOS) means this can only be used when using DWARF (and with -glldb on Linux). * We essentially hardcoded the C standard library paths on some platforms (Linux) or just couldn't support this feature on other platforms (macOS). This patch drops the whole idea of looking at the imported module DWARF tags and instead just uses the support files of the compilation unit. If we look at the support files and see file paths that indicate where the C standard library and libc++ are, we can just create the module configuration this information. This fixes all the problems above which means we can enable all the tests now on Linux, macOS and with other debug information than what we currently had. The only debug information specific code is now the iteration over external type module when -gmodules is used (as `std` and also the `Darwin` module are their own external type module with their own files). The meat of this patch is the CppModuleConfiguration which looks at the file paths from the compilation unit and then figures out the include paths based on those paths. It's quite conservative in that it only enables modules if we find a single C library and single libc++ library. It's still missing some test mode where we try to compile an expression before we actually activate the config for the user (which probably also needs some caching mechanism), but for now it works and makes the feature usable. Reviewers: aprantl, shafik, jdoerfert Reviewed By: aprantl Subscribers: mgorny, abidh, JDevlieghere, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D67760 llvm-svn: 372716
* [lldb][NFC] Relax completion tests for log command to make them pass on LinuxRaphael Isemann2019-09-241-15/+4
| | | | | | | | The log channels change depending on platform, so listing them breaks on some platforms. Let's just check that the 'lldb' and 'dwarf' channels are there which are independent of platform. llvm-svn: 372701
* [LLDB] Avoid warnings about redefining posix mode defines on MinGWMartin Storsjo2019-09-241-1/+11
| | | | | | | | | | | | | Since these defines were added in LLVM SVN r189364 in 2013, mingw-w64 got defines for S_I?GRP, S_IRWXG, S_I?OTH and S_IRWXO in 2015. Also change the existing defined(_MSC_VER) into ifndef S_IRUSR, for consistency. Differential Revision: https://reviews.llvm.org/D67910 llvm-svn: 372700
* [LLDB] [Windows] Add missing ifdefs to fix building for non-x86 architecturesMartin Storsjo2019-09-241-1/+14
| | | | | | | | | | While debugging on those architectures might not be supported yet, the generic code should still be buildable. This file accesses x86 specific fields in the CONTEXT struct. Differential Revision: https://reviews.llvm.org/D67911 llvm-svn: 372699
* [lldb] Fix log output and UtilityTests/LogChannelTest.ListRaphael Isemann2019-09-241-0/+1
| | | | | | | I refactored this code in 372691 and it seems I didn't fully replicate the original log output, so that test was failing. llvm-svn: 372696
* [lldb] Remove redundant argument lists in CompletionRequestRaphael Isemann2019-09-244-20/+13
| | | | | | | | | | | We currently have two lists in the CompletionRequest that we inherited from the old API: The complete list of arguments ignoring where the user requested completion and the list of arguments that stops at the cursor. Having two lists of arguments is confusing and can lead to subtle errors, so let's remove the complete list until we actually need it. llvm-svn: 372692
* [lldb] Add completion support for log enable/disable/listRaphael Isemann2019-09-244-7/+110
| | | | | | | | | | | | | | Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67903 llvm-svn: 372691
* Ignore generated @import statements in the expression evaluatorRaphael Isemann2019-09-243-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The ClangModulesDeclVendor is currently interpreting all injected `@import` statements in our expression wrapper as modules that the user has explicitly requested to be persistently loaded. As we inject `@import` statements with our std module prototype, the ClangModulesDeclVendor will start compiling and loading unrelated C++ modules because it thinks the user has requested that it should load them. As the ClangModulesDeclVendor is lacking the setup to compile these modules (e.g. it lacks the include paths), it will then actually just fail to compile them and cause the whole expression evaluation to fail. This causes these tests to fail on systems that enable the ClangModulesDeclVendor (such as macOS). This patch fixes this by preventing the ClangModulesDeclVendor from interpreting `@import` statements in the wrapper source code. This is done by check if the import happens in the fake source file containing our wrapper code (which implies it was generated by LLDB). This patch doesn't reenable the tests as there is more work needed to get the tests running on macOS (D67760) Reviewers: aprantl, shafik, jingham Subscribers: lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D61565 llvm-svn: 372690
* Adapt test to upstream clang compiler changes.Adrian Prantl2019-09-241-1/+4
| | | | | | Clang now emits the correct C++ language version in DWARF. llvm-svn: 372677
* [Make] Add support for building NeXT-style frameworksJonas Devlieghere2019-09-231-11/+40
| | | | | | | | | | This patch extends the Makefile.rules to build NeXT-style frameworks. It also fixes a bug in the clean logic that would accidentally delete the .mm source file instead of the .o object file. Thanks a lot to Adrian who was instrumental is getting this to work! llvm-svn: 372669
* [LLDB] [Windows] Map COFF ARM machine ids to the right triple architecturesMartin Storsjo2019-09-231-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D67913 llvm-svn: 372658
* [LLDB] [PECOFF] Recognize arm64 executablesMartin Storsjo2019-09-231-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D67912 llvm-svn: 372657
* [LLDB] Rework a MinGW build fix from D65691Martin Storsjo2019-09-231-3/+1
| | | | | | | | | | | That change didn't contain any explanation for this bit. There shouldn't be any need for a check for MinGW ifdefs here, as long as the include uses lowercase windows.h (as is used consistently elsewhere in the llvm projects). Differential Revision: https://reviews.llvm.org/D67894 llvm-svn: 372656
* File::SetDescriptor() should require optionsJonas Devlieghere2019-09-2311-27/+54
| | | | | | | | | | | | | | | | | | | | | | lvm_private::File::GetStream() can fail if m_options == 0 It's not clear from the header a File created with a descriptor will be not be usable by many parts of LLDB unless SetOptions is also called, but it is. This is because those parts of LLDB rely on GetStream() to use the file, and that in turn relies on calling fdopen on the descriptor. When calling fdopen, GetStream relies on m_options to determine the access mode. If m_options has never been set, GetStream() will fail. This patch adds options as a required argument to File::SetDescriptor and the corresponding constructor. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67792 llvm-svn: 372652
* [Host] File::GetWaitableHandle() should call fileno()Jonas Devlieghere2019-09-233-1/+38
| | | | | | | | | | | | If the file has m_stream, it may not have a m_descriptor. GetWaitableHandle() should call GetDescriptor(), which will call fileno(), so it will get waitable descriptor whenever one is available. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67789 llvm-svn: 372644
* [ABISysV] Fix regression for Simulator and MacABIJonas Devlieghere2019-09-231-7/+23
| | | | | | | | | | | | | | | The ABISysV ABI was refactored in r364216 to support the Windows ABI for x86_64. In particular it changed ABISysV_x86_64::CreateInstance to switch on the OS type. This breaks debugging MacABI apps as well as apps in the simulator. This adds back the necessary cases. We have a test on Github that exercises this code path and which I'd like to upstream once the remaining MacABI parts become available in clang. Differential revision: https://reviews.llvm.org/D67869 llvm-svn: 372642
* [lldb-suite] TestCallOverriddenMethod.py is now passing on WindowsStella Stamenova2019-09-231-1/+0
| | | | | | The test is now passing, so remove the expected failure. No other tests associated with the bug are passing, though, so only remove expected failure from this one test llvm-svn: 372634
* [LLDB] Fix logically dead codeKonrad Kleine2019-09-231-3/+0
| | | | | | | | | | | | | | | | | | | Summary: The indicated dead code may have performed some action; that action will never occur. In lldb_private::LoadedModuleInfoList::LoadedModuleInfo::operator ==(lldb_private::LoadedModuleInfoList::LoadedModuleInfo const &): Code can never be reached because of a logical contradiction (CWE-561) Coverity Scan: https://scan.coverity.com/projects/kwk-llvm-project?tab=overview CID 221581 Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67915 llvm-svn: 372608
* [LLDB] Check for _WIN32 instead of _MSC_VER for code specific to windows in ↵Martin Storsjo2019-09-235-9/+9
| | | | | | | | | | | general These ifdefs contain code that isn't specific to MSVC but useful for any windows target, like MinGW. Differential Revision: https://reviews.llvm.org/D67893 llvm-svn: 372592
* [LLDB] Remove a now redundant windows specific workaroundMartin Storsjo2019-09-231-5/+0
| | | | | | | | | | | | | | | | vsnprintf(NULL, 0, ...) works for measuring the needed string size on all supported Windows variants; it's supported since at least MSVC 2015 (and LLVM requires a newer version than that), and works on both msvcrt.dll (since at least XP) and UCRT with MinGW. The previous use of ifdefs was wrong as well, as __MINGW64__ only is defined for 64 bit targets, and the define without trailing underscores is never defined automatically (neither by clang nor by gcc). Differential Revision: https://reviews.llvm.org/D67861 llvm-svn: 372591
* [LLDB] Add a void* cast when passing object pointers to printf %pMartin Storsjo2019-09-231-14/+10
| | | | | | | | | | This fixes build warnings in MinGW mode. Also remove leftover if (log) {} around the log macro. Differential Revision: https://reviews.llvm.org/D67896 llvm-svn: 372590
* [LLDB] Avoid a warning about an unused static variableMartin Storsjo2019-09-231-1/+1
| | | | | | | | The variable is unused on windows. Differential Revision: https://reviews.llvm.org/D67895 llvm-svn: 372589
* [LLDB] Remove a stray semicolon. NFC.Martin Storsjo2019-09-231-1/+1
| | | | | | This fixes build warnings with at least GCC. llvm-svn: 372588
* [LLDB] Add a missing specification of linking against dbghelpMartin Storsjo2019-09-231-0/+8
| | | | | | | | | | | | | | | | | | | The PECOFF object file plugin uses the dbghelp API, but doesn't specify that it has to be linked in anywhere. Current MSVC based builds have probably succeeded, as other parts in LLDB have had a "#pragma comment(lib, "dbghelp.lib")", but there's currently no such pragma in the PECOFF plugin. The "#pragma comment(lib, ...)" approach doesn't work in MinGW mode (unless the compiler is given the -fms-extensions option, and even then, it's only supported by clang/lld, not by GCC/binutils), thus add it to be linked via CMake. (The other parts of LLDB that use dbghelp are within _MSC_VER ifdefs.) Differential Revision: https://reviews.llvm.org/D67885 llvm-svn: 372587
* [LLDB] Use the Windows SOCKET type on all windows targets, not only MSVCMartin Storsjo2019-09-231-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D67859 llvm-svn: 372586
* [lldb][NFC] Remove unused variable in Options::HandleOptionArgumentCompletionRaphael Isemann2019-09-231-1/+0
| | | | llvm-svn: 372574
* [lldb][NFC] Remove dead code in Options::HandleOptionArgumentCompletionRaphael Isemann2019-09-231-9/+2
| | | | llvm-svn: 372572
* [lldb][NFC] Fix documentation of CompletionRequest::AddCompletionRaphael Isemann2019-09-231-1/+2
| | | | llvm-svn: 372569
* [lldb][NFC] Make cursor char position unsigned in CompletionRequestRaphael Isemann2019-09-232-6/+6
| | | | | | | This was only an 'int' because to fit into the old API which is gone by now. llvm-svn: 372568
* [lldb] Make cursor index in CompletionRequest unsignedRaphael Isemann2019-09-236-35/+46
| | | | | | | | | | | | The fact that index==-1 means "no arguments" is not obvious and only used in one place from what I can tell. Also fixes several warnings about using the cursor index as if it was a size_t when comparing. Not fully NFC as we now also correctly update the partial argument list when injecting the fake empty argument in the CompletionRequest constructor. llvm-svn: 372566
OpenPOWER on IntegriCloud