summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [Symbol] Move VerifyDecl to ClangASTContextAlex Langford2019-08-204-35/+5
| | | | | | VerifyDecl is specific to clang and is only used in ClangASTContext. llvm-svn: 369456
* [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
OpenPOWER on IntegriCloud