summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLDB][Test] Remove `skipIfWindows` for conditional breakpoint test (NFC)Med Ismail Bennani2019-08-201-8/+0
| | | | | | | | | | | | | | | | | | | | | Summary: The test for conditional breakpoints on Windows was skipped because there was no expression evaluation support at the time it was written. After removing the annotation and testing it again, the test is passing. http://lists.llvm.org/pipermail/lldb-dev/2019-August/015405.html Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: stella.stamenova, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66499 llvm-svn: 369453
* [NFC] Update RegularExpression documentationJonas Devlieghere2019-08-201-21/+14
| | | | llvm-svn: 369452
* [Symbol][NFC] Remove references to clang in TypeMapAlex Langford2019-08-201-13/+0
| | | | llvm-svn: 369436
* [CMake] Remove LLDB_TEST_USE_CUSTOM_C(XX)_COMPILERJonas Devlieghere2019-08-203-15/+4
| | | | | | | | | | | | Given that LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_C_COMPILER are both set at configuration time, I don't really see the point of having both. This patch simplifies things and uses the custom C/C++ compiler when the variable is set, and uses the default one when it's not set. The variable can be unset by passing -ULLDB_TEST_C_COMPILER to CMake. Differential revision: https://reviews.llvm.org/D66429 llvm-svn: 369435
* [ClangExpressionParser] Add ClangDeclVendorAlex Langford2019-08-207-29/+81
| | | | | | | | | | | | | | | | Summary: This introduces a layer between DeclVendor and the currently implemented DeclVendors (ClangModulesDeclVendor and AppleObjCDeclVendor). This allows the removal of DeclVendor::GetImporterSource which is extremely clang-specific, freeing up the interface to be more general. A good follow up to this would be to remove the remaining instances of clang in DeclVendor, either by moving things to ClangDeclVendor or by using wrappers (e.g. CompilerDecl instead of clang::NamedDecl). Differential Revision: https://reviews.llvm.org/D66451 llvm-svn: 369424
* Make the FindTypes(std::vector<CompilerContext>, ...) API testable in lldb-testAdrian Prantl2019-08-203-3/+87
| | | | | | | | | | | | | This adds a -compiler-context=<...> option to lldb-test that trakes a comma-separated string that is a list of kind/name pairs and translates it into a std::vector<CompilerContext>, a CompilerContext being a pair of context-kind and name. Differential Revision: https://reviews.llvm.org/D66453 <rdar://problem/54471165> llvm-svn: 369407
* [lldb] Use the new Regex::isValid() with no parameterJan Kratochvil2019-08-201-4/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D66463 llvm-svn: 369398
* Fix build for r369374Pavel Labath2019-08-201-0/+1
| | | | | | | | | | This patch added some gtest code to the TestingSupport library. As this is not a unit test, but a unit test library, gtest does not get added to the include path automatically, but we have to do that ourselves. (It was working for me without this because the compiler picked up the system gtest instead.) llvm-svn: 369381
* Convert minidump unittests to use llvm::yaml::convertYAMLPavel Labath2019-08-201-6/+7
| | | | | | | | previously they used a minidump-specific function for this purpose, but this is no longer needed now that whole of yaml2obj is available as a library. llvm-svn: 369379
* unittests: Use yaml2obj as a library instead of an external processPavel Labath2019-08-2013-411/+390
| | | | | | | | | | | | | | | Summary: Recently, yaml2obj has been turned into a library. This means we can use it from our unit tests directly, instead of shelling out to an external process. This patch does just that. Reviewers: JDevlieghere, aadsm, espindola, jdoerfert Subscribers: emaste, mgorny, arichardson, MaskRay, jhenderson, abrachet, lldb-commits Differential Revision: https://reviews.llvm.org/D65949 llvm-svn: 369374
* [cmake] Remove the test for libstdc++<4.9Pavel Labath2019-08-201-22/+0
| | | | | | It is no longer relevant now that llvm requires >=5.1. llvm-svn: 369371
* [lldb][NFC] Test quotes when completingRaphael Isemann2019-08-201-0/+26
| | | | llvm-svn: 369353
* [lldb] D66174 `RegularExpression` cleanupJan Kratochvil2019-08-2014-71/+61
| | | | | | | | | | I find as a good cleanup to drop the Compile method. As I do not find TIMTOWTDI as an advantage and there is already constructor parameter to compile the regex. Differential Revision: https://reviews.llvm.org/D66392 llvm-svn: 369352
* [lldb] Fix typo on the BreakpointLocation header and the lldbtest.py (NFC)Med Ismail Bennani2019-08-193-17/+38
| | | | | | | | | | | | | | | Summary: This commit fixes some typo I found while exploring LLDB's codebase. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66452 llvm-svn: 369313
* Windows: Include "windows" Instead of "Windows"Saleem Abdulrasool2019-08-195-5/+5
| | | | | | | | | The actual include directory is lldb/Host/windows not lldb/Host/Windows which breaks on case sensitive file systems Patch by Gwen Mittertreiner! llvm-svn: 369307
* Fix use-after-freeMatthias Gehre2019-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The warning ``` lldb/source/Core/FormatEntity.cpp:2350:25: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling] ``` is emitted after annotating `llvm::StringRef` with `[[gsl::Pointer]]`. The reason is that in ``` size_t FormatEntity::AutoComplete(CompletionRequest &request) { llvm::StringRef str = request.GetCursorArgumentPrefix().str(); ``` the function `GetCursorArgumentPrefix()` returns a `StringRef`, and `StringRef::str()` returns a temporary `std::string`. Reviewers: jingham, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66442 llvm-svn: 369304
* [lldb-vscode] add `launchCommands` to handle launch specific commandsAlex Langford2019-08-194-19/+110
| | | | | | | | | | | | | | Summary: This can help `lldb-vscode` handle launch commands associate with remote platform attach request have field `attachCommands` to handle attach specific commands add a corresponding one for launch request if no launch command is provided, create a new target and launch; otherwise, execute the launch command Differential Revision: https://reviews.llvm.org/D65363 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 369296
* [lldb] Make TestIOHandlerCompletion more stable and document itRaphael Isemann2019-08-191-1/+4
| | | | | | | | | | Instead of relying that three tabs show all completions, we should show all remaining completions which will always stop the mode where we show completions. Should fix this test on systems that somehow have more completions that our normal LLDB (as they would end up being stuck in the mode where we show completions). llvm-svn: 369293
* [dotest] Add --dwarf-version to override the tested DWARF version.Jonas Devlieghere2019-08-195-7/+22
| | | | | | | | | | | | | On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration. [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ Differential revision: https://reviews.llvm.org/D66370 llvm-svn: 369272
* [lldb][NFC] Stop using GetNumberOfMatches in CompletionRequest testRaphael Isemann2019-08-191-14/+14
| | | | | | | | This function is just a wrapper for GetNumberOfResults and will be removed soon. This patch just changes all calls to GetNumberOfResults where possible (which is currently just the unit test). llvm-svn: 369267
* [lldb][NFC] Use CompletionRequest in Variable::AutoCompleteRaphael Isemann2019-08-191-43/+32
| | | | llvm-svn: 369252
* [lldb][NFC] Add a few more completion tests to increase test coverageRaphael Isemann2019-08-191-0/+23
| | | | | | | These tests are mostly trying to reach the different completion functions in CommandCompletions.cpp (::ArchitectureNames, ::DiskFiles, ::Modules). llvm-svn: 369249
* [lldb][NFC] Remove StringList::AutoCompleteRaphael Isemann2019-08-193-37/+12
| | | | | | | We don't need this very specific function in StringList that we only call once in LLDB. llvm-svn: 369242
* [lldb][NFC] Use GetMaxStringLength in CommandObjectApropos::DoExecuteRaphael Isemann2019-08-191-5/+1
| | | | llvm-svn: 369240
* [lldb][NFC] Address review comments to StringList for-loop supportRaphael Isemann2019-08-194-8/+8
| | | | llvm-svn: 369237
* [lldb] Remove unused inheritance in RegularExpressionJan Kratochvil2019-08-191-1/+1
| | | | | | | | D66174 left inherited llvm::Regex which is now a member variable there. Approved as a part of: https://reviews.llvm.org/D66392#1634575 llvm-svn: 369235
* [CMake] Update CMAKE_OSX_DEPLOYMENT_TARGET to 10.12.Jonas Devlieghere2019-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | After LLVM moved to C++14, the RWMutex implementation was removed in favor of std::shared_timed_mutex, which is only available on macOS 10.12 and later. As a workaround for older deployment targets, I added the original RWMutexImpl again, guarded by the deployment target. When doing a standalone build of LLDB using the Xcode generator, the CMake cache specifies a minimum deployment target. However, LLVM and Clang might have been built with a different minimum deployment target. This is exactly what happened for the Xcode build. LLVM was built with a minimum deployment target newer than 10.12, using std::shared_timed_mutex. LLDB on the other hand was built with a minimum deployment target of 10.11, using the old RWMutexImpl, resulting in undefined symbols at link-time. This patch changes the minimum deployment target for the Xcode build to 10.12 to work around this problem. A better solution would involve synchronizing the minimum deployment or even not setting one at all. llvm-svn: 369220
* [lldb][NFC] Remove unused MaterializeInitializer and MaterializeInternalVariableRaphael Isemann2019-08-172-86/+0
| | | | llvm-svn: 369198
* Simplify code (NFC).Adrian Prantl2019-08-171-22/+19
| | | | llvm-svn: 369179
* [Utility] Reimplement RegularExpression on top of llvm::RegexJonas Devlieghere2019-08-1628-468/+275
| | | | | | | | | | | | | | | Originally I wanted to remove the RegularExpression class in Utility and replace it with llvm::Regex. However, during that transition I noticed that there are several places where need the regular expression string. So instead I propose to keep the RegularExpression class and make it a thin wrapper around llvm::Regex. This patch also removes the workaround for empty regular expressions. The result is that we are now (more or less) POSIX conformant. Differential revision: https://reviews.llvm.org/D66174 llvm-svn: 369153
* [lldb][NFC] Allow for-ranges on StringListRaphael Isemann2019-08-1611-32/+48
| | | | llvm-svn: 369113
* [lldb-server] Disable a test on Windows until it can be fixedAaron Smith2019-08-161-0/+4
| | | | llvm-svn: 369083
* [DebugLine] Don't try to guess the path styleJonas Devlieghere2019-08-151-17/+12
| | | | | | | | | | | In r368879 I made an attempt to guess the path style from the files in the line table. After some consideration I now think this is a poor idea. This patch undoes that behavior and instead adds an optional argument to specify the path style. This allows us to make that decision elsewhere where we have more information. In case of LLDB based on the Unit. llvm-svn: 369072
* Stop-hooks weren't getting called on step-out. Fix that.Jim Ingham2019-08-156-4/+85
| | | | | | | | | | | | | | | | There was a little bit of logic in the StopInfoBreakpoint::PerformAction that would null out the StopInfo once we had a completed plan so that the next call to GetStopInfo would replace it with the StopInfoThreadPlan. But the stop-hooks check for whether a thread stopped for a reason didn't trigger this conversion. So I added an API to do that directly, and then called it where before we just reset the StopInfo. <rdar://problem/54270767> Differential Revision: https://reviews.llvm.org/D66241 llvm-svn: 369052
* Change test to use uint64_t to support compiling for 32-bit architectures.Adrian Prantl2019-08-151-2/+2
| | | | llvm-svn: 369034
* [lldb][NFC] Refactor remaining completion logic to use CompletionRequestsRaphael Isemann2019-08-1510-92/+89
| | | | | | | | | | | | | | | | | | | | This patch moves the remaining completion functions from the old completion API (that used several variables) to just passing a single CompletionRequest. This is for the most part a simple change as we just replace the old arguments with a single CompletionRequest argument. There are a few places where I had to create new CompletionRequests in the called functions as CompletionRequests itself are immutable and don't expose their internal match list anymore. This means that if a function wanted to change the CompletionRequest or directly access the result list, we need to work around this by creating a new CompletionRequest and a temporary match/description list. Preparation work for rdar://53769355 llvm-svn: 369000
* [lldb] Let LLDB depend on intrinsics_gen to fix non-deterministic module ↵Raphael Isemann2019-08-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build failures Summary: When building with modules we currently fail randomly to build LLDB's modules and get error messages like below: ``` In file included from <module-includes>:1: In file included from llvm-project/llvm/include/llvm/IR/Argument.h:18: llvm-project/llvm/include/llvm/IR/Attributes.h:74:14: fatal error: 'llvm/IR/Attributes.inc' file not found #include "llvm/IR/Attributes.inc" ^~~~~~~~~~~~~~~~~~~~~~~~ ... In file included from llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp:9: llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h:12:10: fatal error: could not build module 'lldb_Wrapper' ``` The reason for this is that our source files can include Clang headers which in turn include files like Attributes.inc which are generated by intrinsics_gen. However, it seems Clang can't express this dependency in its CMake code, so intrinsics_gen is actually not guaranteed to be built before we start parsing LLDB source files and Clang headers. Clang worked around this by letting all libraries depend on intrinsics_gen, which at least lets their builds pass. As I haven't figured out how to solve these dependencies properly and I want to get the LLDB+Modules build green, I suggest we copy Clang's hack until we figure out how to get Clang's dependencies right. Reviewers: sgraenitz, aprantl, JDevlieghere Reviewed By: JDevlieghere Subscribers: mgorny, javed.absar, kristof.beyls, mgrang, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66208 llvm-svn: 368975
* Fix variable mismatch between signature and bodyJonas Devlieghere2019-08-151-3/+3
| | | | | | | I updated the signature to conform to the LLDB coding style but accidentally forgot to update the function body. llvm-svn: 368962
* [NFC] Fix documentation for some utility classes.Jonas Devlieghere2019-08-153-32/+25
| | | | | | This fixes a few warnings emitted when compiling with -Wdocumentation. llvm-svn: 368959
* Improve anonymous class heuristic in ClangASTContext::CreateRecordTypeShafik Yaghmour2019-08-145-14/+49
| | | | | | | | | Summary: Currently the heuristic used in ClangASTContext::CreateRecordType to identify an anonymous class is that there is that name is a nullptr or simply a null terminator. This heuristic is not accurate since it will also sweep up unnamed classes and lambdas. The improved heuristic relies on the requirement that an anonymous class must be contained within a class. Differential Revision: https://reviews.llvm.org/D66175 llvm-svn: 368937
* [LLDB] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-1463-110/+110
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368933
* Revert "[lldb] Reinstate original guard variable check"Raphael Isemann2019-08-141-5/+9
| | | | | | | | | | | It seems this breaks the following tests: lldb-Suite :: expression_command/call-function/TestCallUserDefinedFunction.py lldb-Suite :: expression_command/rdar42038760/TestScalarURem.py Let's revert this patch and wait until we find an actual issue that could be fixed by also doing the guard variable check on Windows. llvm-svn: 368920
* [lldb][NFC] Remove unused functionJordan Rupprecht2019-08-141-5/+0
| | | | llvm-svn: 368904
* [DebugLine] Improve path handling.Jonas Devlieghere2019-08-141-12/+11
| | | | | | | | | | | | | | | | | After switching over LLDB's line table parser to libDebugInfo, we noticed two regressions on the Windows bot. The problem is that when obtaining a file from the line table prologue, we append paths without specifying a path style. This leads to incorrect results on Windows for debug info containing Posix paths: 0x0000000000201000: /tmp\b.c, is_start_of_statement = TRUE This patch is an attempt to fix that by guessing the path style whenever possible. Differential revision: https://reviews.llvm.org/D66227 llvm-svn: 368879
* Add missing NativeProcessFactory for lldb-server on WindowsAaron Smith2019-08-141-0/+4
| | | | llvm-svn: 368872
* Add missing SetID method to fix Windows buildAaron Smith2019-08-141-0/+2
| | | | llvm-svn: 368852
* Revert "Minidump/Windows: Fix module lookup"Pavel Labath2019-08-144-69/+0
| | | | | | | | | | | Although there is nothing wrong with this patch, the test added here uncovers a problem in other parts of the code which cause the test to fail when running under asan. Reverting the patch until I can fix the underlying issue(s). This reverts commit r368416. llvm-svn: 368838
* [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2019-08-143-9/+21
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806
* [lldb] Reinstate original guard variable checkRaphael Isemann2019-08-141-9/+5
| | | | | | | | | | The isGuardVariableSymbol option for ignoring Microsoft's ABI was originally added to get the bots green, but now that we found the actual issue (that we checked for prefix instead of suffix in the MS ABI check), we should be able to properly implement the guard variable check without any strange Microsoft exceptions. llvm-svn: 368802
* Fix warning: suggest braces around initialization of subobjectJonas Devlieghere2019-08-141-5/+7
| | | | | | This patch adds braces to the DEFINE_XMM macro. llvm-svn: 368782
OpenPOWER on IntegriCloud