summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[lldb/Command] Add --force option for `watchpoint delete` command"Med Ismail Bennani2020-01-033-119/+19
| | | | This reverts commit 3620e5f28a4d2800fb6c325ec24b3d660e48b9ba.
* [lldb/Python] Remove unused imports (NFC)Jonas Devlieghere2020-01-021-9/+0
|
* [lldb/Python] Remove unused support file (NFC)Jonas Devlieghere2020-01-021-58/+0
|
* [lldb/Command] Add --force option for `watchpoint delete` commandMed Ismail Bennani2020-01-033-19/+119
| | | | | | | | | | | | Currently, there is no option to delete all the watchpoint without LLDB asking for a confirmation. Besides making the watchpoint delete command homogeneous with the breakpoint delete command, this option could also become handy to trigger automated watchpoint deletion i.e. using breakpoint actions. rdar://42560586 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb/CMake] Print whether an optional dependency was enabled.Jonas Devlieghere2020-01-021-5/+7
| | | | | | Use a status message to convey whether an optional dependency was found or not. With the auto-detection code it's not longer as simple as checking the CMake cache.
* [lldb/CMake] Fix variable naming in FindLibEditJonas Devlieghere2020-01-026-26/+28
| | | | | | | | | | | | The current FOUND_VAR for FindLibEdit is libedit_FOUND but wasn't set by find_package_handle_standard_args. However this isn't valid for the package name. The argument for FOUND_VAR is "libedit_FOUND", but only "LibEdit_FOUND" and "LIBEDIT_FOUND" are valid names. This fixes all the variables set by FindLibEdit to match the desired naming scheme.
* [lldb/CMake] Use PYTHON_LIBRARIES instead of PYTHON_LIBRARYJonas Devlieghere2020-01-023-5/+5
| | | | | | PYTHON_LIBRARIES is the canonical variable set by FindPythonLibs while PYTHON_LIBRARY is an implementation detail. This replaces the uses of the latter with the former.
* build: reduce CMake handling for zlibSaleem Abdulrasool2020-01-022-3/+3
| | | | | | | | | | | | | Rather than handling zlib handling manually, use `find_package` from CMake to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`, `HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is set to `YES`, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling. This restores 68a235d07f9e7049c7eb0c8091f37e385327ac28, e6c7ed6d2164a0659fd9f6ee44f1375d301e3cad. The problem with the windows bot is a need for clearing the cache.
* Revert "build: reduce CMake handling for zlib"James Henderson2020-01-022-3/+3
| | | | | | | This reverts commit 68a235d07f9e7049c7eb0c8091f37e385327ac28. This commit broke the clang-x64-windows-msvc build bot and a follow-up commit did not fix it. Reverting to fix the bot.
* [lldb] Fix crash in AccessDeclContextSanity when copying ↵Raphael Isemann2020-01-025-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | FunctionTemplateDecl inside a record. Summary: We currently don't set access specifiers for function template declarations. This seems to be fine as long as the function template is not declared inside any record in which case Clang asserts with the following once we try to query it's access: ``` Assertion failed: (Access != AS_none && "Access specifier is AS_none inside a record decl"), function AccessDeclContextSanity, ``` This patch just marks these function template declarations as public to make Clang happy. Reviewers: shafik, teemperor Reviewed By: teemperor Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71909
* [lldb][NFC] Remove unused variable in DWARFASTParserClang::ParseSingleMemberRaphael Isemann2020-01-021-1/+0
|
* [lldb][NFC] Create type-safe function for creating a CompilerType from a ↵Raphael Isemann2020-01-027-286/+222
| | | | | | | | | | | | | | | | | | | | | | QualType LLDB frequently converts QualType to CompilerType. This is currently done like this: result = CompilerType(this, qual_type_var.getAsOpaquePtr()) There are a few shortcomings in this current approach: 1. CompilerType's constructor takes a void* pointer so it isn't type safe. 2. We can't add any sanity checks to the CompilerType constructor (e.g. that the type actually belongs to the passed ClangASTContext) without expanding the TypeSystem API. 3. The logic for converting QualType->CompilerType is spread out over all of LLDB so changing it is difficult (e.g., what if we want to just pass the type ptr and not the 1type_ptr | qual_flags1 to CompilerType). This patch adds a `ClangASTContext::GetType` function similar to the other GetTypeForDecl functions that does this conversion in a type safe way. It also adds a sanity check for Tag-based types that the type actually belongs to the current ClangASTContext (Types don't seem to know their ASTContext, so we have to workaround by looking at the decl for the underlying TagDecl. This doesn't cover all types we construct but it's better than no sanity check).
* build: reduce CMake handling for zlibSaleem Abdulrasool2020-01-012-3/+3
| | | | | | | | | Rather than handling zlib handling manually, use `find_package` from CMake to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`, `HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is set to `YES`, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling.
* tests: XFAIL/UNSUPPORTED tests on WindowsSaleem Abdulrasool2020-01-015-4/+12
| | | | | | | | | Now that we are building the python bindings on Windows once more, the extended testsuite is running. Mark a few failing tests and skip a few tests which hang. This should at least bring the bot back to green without reverting the Python changes which are an improvement for the build system and enable another ~35% of the test suite which was previously disabled.
* [lldb][NFC] Simplify CompilerType constructors/destructors and fix unused ↵Raphael Isemann2020-01-013-14/+5
| | | | | | | | | variable warning CompilerType has no virtual functions and no statements in its constructors, so we can simplify this code. This also allows Clang to emit unused variable warnings for CompilerType, so I also removed one unused variable that otherwise causes -Werror builds to fail.
* [NFC] Fixes -Wrange-loop-analysis warningsMark de Wever2020-01-013-3/+3
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71857
* [lldb][NFC] Make some checks more readable in Variable::PrivateAutoCompleteRaphael Isemann2020-01-011-3/+3
|
* [lldb][NFC] Simplify ClangASTContext::GetTypeForDeclRaphael Isemann2019-12-303-23/+12
| | | | Also removes the GetASTContext call from this code.
* [lldb][NFC] Make integer types functions in ClangASTContext not staticRaphael Isemann2019-12-292-53/+34
| | | | | | These functions need a ClangASTContext instance that we would otherwise recalculate by calling GetASTContext (which is no longer necessary with this patch).
* [lldb][NFC] Delete static versions of ClangASTContext::CreateFunctionTypeRaphael Isemann2019-12-293-37/+17
| | | | We can always call the member function version of this function.
* [lldb][NFC] Remove most GetASTContext calls in AST metadata codeRaphael Isemann2019-12-293-38/+21
|
* [lldb][NFC] Remove GetASTContext call in ClangPersistentVariablesRaphael Isemann2019-12-283-27/+36
| | | | | | | | We try to build a CompilerType from the persistent decls so we need a ClangASTContext. With this patch the ClangPersistentVariables store the associated ClangASTContext of the persistent decls (which is always the scratch ClangASTContext) and no longer call GetASTContext to map back from clang::ASTContext to ClangASTContext.
* [lldb][NFC] Remove GetASTContext call in ClangDeclVendorRaphael Isemann2019-12-285-22/+20
| | | | | | | | Instead of returning NamedDecls and then calling GetASTContext to find back the ClangASTContext we used can just implement the FindDecl variant that returns CompilerDecls (and implement the other function by throwing away the ClangASTContext part of the compiler decl).
* [lldb] Silent random xpass on aarch64-linux buildbotMuhammad Omair Javaid2019-12-271-1/+1
| | | | | | This patch adds skipif decorator to TestWatchLocationWithWatchSet.py. Decorator will trigger for aarch64-linux as this test passes randomly causing buildbot failure.
* [lldb][test] Don't include "test_common.h" in the debug macros testTatyana Krasnukha2019-12-261-0/+3
| | | | | GCC produces incorrect .debug_macro section when "-include" option is used: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93075.
* [lldb] Specify unsigned underlying type for an enumeration explicitlyTatyana Krasnukha2019-12-261-1/+3
| | | | | | | | | | | | | The enumeration EntryType is used as a bit field of DebugMacroEntry: ``` EntryType m_type : 3 ``` Since underlying type of enumeration is implementation-dependent, a signed integer is converted to the 3-bit value by some compilers (MSVC). That's why a DebugMacroEntry instance that was created with EntryType value > 3 (END_FILE or INDIRECT) contains incorrect negative value in its m_type data-member.
* [lldb][NFC] Move lock scope where it should beginTatyana Krasnukha2019-12-261-9/+10
|
* [lldb][NFC] Add "lldb-vscode" to all_categoriesTatyana Krasnukha2019-12-261-0/+1
| | | | Required to make the category manually disableable.
* [lldb][NFC] Simplify if-returnTatyana Krasnukha2019-12-261-3/+1
|
* [lldb][tests] Platform triple can be NoneTatyana Krasnukha2019-12-261-1/+6
| | | | If a remote target is not connected, SBPlatform's GetTriple function returns None.
* [lldb][tests] Posix function strdup requires macro _POSIX_C_SOURCETatyana Krasnukha2019-12-261-0/+2
|
* [lldb][NFC] Use ClangASTContext in AppleObjCRuntime interfacesRaphael Isemann2019-12-265-61/+46
| | | | | | | This code actually needs a ClangASTContext but instead takes a clang::ASTContext and then retrieves the original ClangASTContext via the global map of ClangASTContexts. Let's change it so that it takes a ClangASTContext which is simpler and faster.
* [lldb] Remove some calls to GetASTContextRaphael Isemann2019-12-263-36/+21
| | | | | | | GetASTContext is really expensive to call as it makes use of the global mapping from ASTContext to ClangASTContext. This replaces all calls where we already have the ClangASTContext around and don't need to call GetASTContext again.
* [lldb][NFC] Use StringRef in ↵Raphael Isemann2019-12-253-49/+43
| | | | ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize
* [lldb] Adapt for NetBSD-9.99.30 ptrace(2) API changesKamil Rytarowski2019-12-242-2/+21
| | | | | | | | Switch from PT_LWPINFO to PT_LWPSTATUS/PT_LWPNEXT. Keep compat support for < 9.99.30. No functional change intended.
* test: ensure that we dead-strip in the linkerSaleem Abdulrasool2019-12-241-0/+1
| | | | | `/OPT:REF` is needed for link to dead strip functions, `/Gy` by itself is not sufficient.
* [lldb][NFC] Move ClangASTContext::m_scratch_ast_source_up to the appropriate ↵Raphael Isemann2019-12-242-11/+17
| | | | | | | | | class m_scratch_ast_source_up is only used by ClangASTContextForExpressions so it should also be declared only in that class. Also make all other members of ClangASTContext private and move the initialization code for ClangASTContextForExpressions into the constructor.
* [lldb][NFC] Remove ClangExternalASTSourceCommonRaphael Isemann2019-12-249-142/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | ClangExternalASTSourceCommon's purpose is to store a map from Decl*/Type* to ClangASTMetadata. Usually this data is accessed via the ClangASTContext interface which then grabs the current ExternalASTSource of its ASTContext, tries to cast it to ClangExternalASTSourceCommon and then accesses the metadata map. If the casting fails the setter does nothing and the getter returns a nullptr as if there was no known metadata for a type/decl. This system breaks as soon as any non-LLDB ExternalASTSource is added via a multiplexer to our existing ExternalASTSource (in which case we suddenly loose all out metadata as the casting always fails with an ExternalASTSource that is not inheriting from ClangExternalASTSourceCommon). This patch moves the metadata map to the ClangASTContext. This gets rid of all the fragile casting, the requirement that every ExternalASTSource in LLDB has to inherit from ClangExternalASTSourceCommon and simplifies the metadata implementation to a simple map lookup. As ClangExternalASTSourceCommon had no other purpose than storing metadata, this patch deletes this class and replaces all uses with clang::ExternalASTSource. No other code changes in this commit beside the AppleObjCDeclVendor which was the only code that did not use the ClangASTContext interface but directly accessed the ClangExternalASTSourceCommon.
* test: correct flags for WindowsSaleem Abdulrasool2019-12-231-0/+2
| | | | | Adjust the flags for the LLDB test on Windows. This test was previously not running, but after the fix to the python detection, we now run this.
* Revert "[lldb] Don't process symlinks deep inside DWARFUnit"Jonas Devlieghere2019-12-232-12/+20
| | | | | This temporarily reverts commit 3cfb6677b2aa20f782d9bb0f7958e61f5a976c16 because it breaks TestCompDirSymLink.py on macOS.
* [lldb/CMake] Always set a value for find_package when finding optional ↵Alex Langford2019-12-231-0/+1
| | | | | | | | | dependencies Because this is a macro, previous values of `find_package` persist between calls. This means that if it is set to TRUE on any run, all subsequent runs will have find_package set to TRUE regardles of whether or not they should be.
* [lldb/Test] Disable TestSynchronous.test on Windows.Jonas Devlieghere2019-12-231-0/+1
| | | | | | The test was being skipped on the Windwos bot because it requires Python which was silently disabled because of a configuration issue. Now that the test runs, this fails as expected.
* [lldb] Remove DWARFUnit::AppendDIEsWithTagPavel Labath2019-12-233-24/+6
| | | | | | | This function is not very useful, as it's forcing a materialization of the returned DIEs, and calling it is not substantially simpler than just iterating over the DIEs manually. Delete it, and rewrite the single caller.
* [lldb/DWARF] Fix hostname-stripping logicPavel Labath2019-12-232-0/+51
| | | | | | | | | | | | | | This bit of code is trying to strip everything up to the first colon from all debug info paths, as dwarf2 recommends this syntax for storing the compilation host name. However, this code was too eager, and it ended up stripping the entire compilation directory, if it did not contain a forward slash (or a "x:\"). Normally this does not matter, as all absolute paths will contain one of these patterns, but this does not have to be the case in case the debug info is produced by "clang -fdebug-compilation-dir", which can end up producing a relative compilation directory with no slashes (this is one of the techniques for producing "relocatable" debug info).
* [lldb][NFC] Remove unused callback functionality from ClangASTContextRaphael Isemann2019-12-232-8/+0
|
* [lldb][NFC] Simplify ClangExternalASTSourceCallbacksRaphael Isemann2019-12-234-182/+27
| | | | | | | | | | | | | | | This class is only used by the ClangASTContext so we might as well simplify this whole logic by just passing a ClangASTContext instead of a list of callbacks and a void* pointer. If we ever need this to support other classes then we can define some interface that ClangASTContext implements but for now this isn't needed. I also removed any code for m_callback_find_by_name as this was always a nullptr in LLDB and removed all overriden implementations that just redefined the default no-op implementation that the ExternalASTSource provides. Also removed the assert.h workarounds.
* [lldb][NFC] Remove unused 'type' parameter in ↵Raphael Isemann2019-12-232-23/+6
| | | | | | ClangExpressionDeclMap::FindGlobalVariable We never pass something else than a nullptr as the 'type' so the related code in this function is never reached.
* [lldb][NFC] Remove wrong and unused ClangASTContext::CopyDecl methodRaphael Isemann2019-12-232-20/+0
|
* [lldb][NFC] Delete all 'else return ...' in CompilerDeclContext.cppRaphael Isemann2019-12-231-8/+4
|
* [lldb] Add sanity check to CreateDeclContext and fixed illformed ↵Raphael Isemann2019-12-233-2/+6
| | | | | | | | | | | | | | | | | | | | | CompilerContext in ClangExpressionDeclMap. This adds a check that the ClangASTContext actually fits to the DeclContext that we want to create a CompilerDeclContext for. If the ClangASTContext (and its associated ASTContext) does not fit to the DeclContext (that is, the DeclContext wasn't created by the ASTContext), all computations using this malformed CompilerDeclContext will yield unpredictable results. Also fixes the only place that actually hits this assert which is the construction of a CompilerDeclContext in ClangExpressionDeclMap where we pass an unrelated ASTContext instead of the ASTContext of the current expression. I had to revert my previous change to DWARFASTParserClangTests.cpp back to using the unsafe direct construction of CompilerDeclContext as this assert won't work if the DeclContext we pass isn't a valid DeclContext in the first place.
OpenPOWER on IntegriCloud