summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb/CMake] Rename LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHONJonas Devlieghere2019-12-1329-96/+87
| | | | | | | This matches the naming scheme used by LLVM and all the other optional dependencies in LLDB. Differential revision: https://reviews.llvm.org/D71482
* LanguageRuntime: Simplify NSException::GetSummary() outputMed Ismail Bennani2019-12-134-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now, NSException::GetSummary() has the following output: "name: $exception_name - reason: $exception_reason" It would be better to simplify the output by removing the name and only showing the exception's reason. This way, annotations would look nicer in the editor, and would be a shorter summary in the Variables Inspector. Accessing the exception's name can still be done by expanding the NSException object in the Variables Inspector. rdar://54770115 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71311 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb/Test] C++ test should use CXXFLAGS_EXTRASJonas Devlieghere2019-12-131-1/+1
| | | | Thanks Ted Woodward for noticing this.
* [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_POSIXJonas Devlieghere2019-12-1319-35/+37
| | | | | Rename LLDB_DISABLE_POSIX to LLDB_ENABLE_POSIX and use cmakedefine01 for consistency.
* [lldb][NFC] Remove all `setUp` overrides that only call the parent ↵Raphael Isemann2019-12-1355-202/+0
| | | | | | | | | | | | | | | | | | | | | | | | | implementation Summary: A lot of our tests copied the setUp code from our TestSampleTest.py: ``` def setUp(self): # Call super's setUp(). TestBase.setUp(self) ``` This code does nothing unless we actually do any setUp work in there, so let's remove all these method definitions. Reviewers: labath, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71454
* [lldb][NFC] Remove unused includes in Utility's source filesRaphael Isemann2019-12-136-15/+0
|
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-13514-536/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [lldb][NFC] Add reminder to TestSampleTest that setUp should be deleted if ↵Raphael Isemann2019-12-131-0/+2
| | | | it not needed.
* [lldb][NFC] Make metadata tracking type safeRaphael Isemann2019-12-135-27/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLDB associates additional information with Types and Declarations which it calls ClangASTMetadata. ClangASTMetadata is stored by the ClangASTSourceCommon which is implemented by having a large map of `void *` keys to associated `ClangASTMetadata` values. To make this whole mechanism even unsafer we also decided to use `clang::Decl *` as one of pointers we throw in there (beside `clang::Type *`). The Decl class hierarchy uses multiple inheritance which means that not all pointers have the same address when they are implicitly converted to pointers of their parent classes. For example `clang::Decl *` and `clang::DeclContext *` won't end up being the same address when they are implicitly converted from one of the many Decl-subclasses that inherit from both. As we use the addresses as the keys in our Metadata map, this means that any implicit type conversions to parent classes (or anything else that changes the addresses) will break our metadata tracking in obscure ways. Just to illustrate how broken this whole mechanism currently is: ```lang=cpp // m_ast is our ClangASTContext. Let's double check that from GetTranslationUnitDecl // in ClangASTContext and ASTContext return the same thing (one method just calls the other). assert(m_ast->GetTranslationUnitDecl() == m_ast->getASTContext()->getTranslationUnitDecl()); // Ok, both methods have the same TU*. Let's store metadata with the result of one method call. m_ast->SetMetadataAsUserID(m_ast->GetTranslationUnitDecl(), 1234U); // Retrieve the same Metadata for the TU by using the TU* from the other method... which fails? EXPECT_EQ(m_ast->GetMetadata(m_ast->getASTContext()->getTranslationUnitDecl())->GetUserID(), 1234U); // Turns out that getTranslationUnitDecl one time returns a TranslationUnitDecl* but the other time // we return one of the parent classes of TranslationUnitDecl (DeclContext). ``` This patch splits up the `void *` API into two where one does the `clang::Type *` tracking and one the `clang::Decl *` mapping. Type and Decl are disjoint class hierarchies so there is no implicit conversion possible that could influence the address values. I had to change the storing of `clang::QualType` opaque pointers to their `clang::Type *` equivalents as opaque pointers are already `void *` pointers to begin with. We don't seem to ever set any qualifier in any of these QualTypes to this conversion should be NFC. Reviewers: labath, shafik, aprantl Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71409
* [lldb/cmake] Temporarily revive LLDB_DISABLE_CURSESPavel Labath2019-12-131-2/+11
| | | | | | | | | At least one lldb bot still uses this cmake variable instead of LLDB_ENABLE_CURSES. Add code to set the default value of the "enable" variable based on the old value of the "disable" setting. This should bring those bots back up, until we can update the master to use the new setting.
* [lldb] Remove xpasses after pr44037 fix committedMuhammad Omair Javaid2019-12-134-24/+1
| | | | | | | This patch removes xpass decorator from tests which were failing due to pr44037. pr44037 was fixed by rev 6ce1a897b6a82e18059fd3b75b8d52ff12c2a605
* [Target] Remove Target::GetScratchClangASTContextAlex Langford2019-12-1226-89/+138
| | | | | | | Target doesn't really need to know about ClangASTContext more than any other TypeSystem. We can create a method ClangASTContext::GetScratch for anything who needs a ClangASTContext specifically instead of just a generic TypeSystem.
* TypeCategory: Initialize m_enabled to falseVedant Kumar2019-12-121-1/+1
| | | | | | | | | The initialization was accidentally lost in https://reviews.llvm.org/D71310, causing a ubsan failure: /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35: runtime error: load of value 190, which is not a valid value for type 'bool' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/buildslave/jenkins/workspace/lldb-cmake-sanitized/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h:278:35 in http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake-sanitized/621/consoleText
* [FormatEntity] Add mangled function name supportMed Ismail Bennani2019-12-125-0/+57
| | | | | | | | | | | | | | | | | | Summary: Add `function.mangled-name` key for FormatEntity to show the mangled function names in backtraces. rdar://54088244 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71237 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb/Core] Add missing include (2/2)Jonas Devlieghere2019-12-121-0/+2
| | | | This got flagged by the debian buildbot.
* [lldb/Core] Add missing includeJonas Devlieghere2019-12-121-1/+1
| | | | This got flagged by the modules build.
* [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_TERMIOSJonas Devlieghere2019-12-124-17/+17
| | | | | | | This renames LLDB_CONFIG_TERMIOS_SUPPORTED to LLDB_ENABLE_TERMIOS. It now also uses cmakedefine01 to keep things consistent with out other optional dependencies. But more importantly it won't silently fail when you forget to include Config.h.
* [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_LIBXML2Jonas Devlieghere2019-12-123-32/+32
| | | | | | This keeps things consistent with out other optional dependencies. But more importantly it won't silently fail when you forget to include Config.h.
* [lldb/CMake] Rename LLDB_DISABLE_LIBEDIT to LLDB_ENABLE_LIBEDITJonas Devlieghere2019-12-1212-39/+39
| | | | | | This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71380
* [lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSESJonas Devlieghere2019-12-127-22/+18
| | | | | | This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71377
* [lldb/DWARF] Fix v5 location lists for dwo filesPavel Labath2019-12-123-1/+198
| | | | | Dwo files don't have a DW_AT_loclists_base -- set one explicitly. Also, make sure we use the correct location list flavour for v5.
* [lldb] Remove ClangASTMetricsRaphael Isemann2019-12-124-106/+0
| | | | | | | | | | | | | | Summary: Not once have I looked at these numbers in a log and considered them useful. Also this should not have been implemented via an unguarded list of globals. Reviewers: martong, shafik Reviewed By: shafik Subscribers: rnkovacs, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71336
* [lldb] "See through" atomic types in ClangASTContextPavel Labath2019-12-122-56/+68
| | | | | | | | | | | | | | | | | Summary: This enables us to display the contents of atomic structs. Calling the removal of _Atomic "desugaring" is not fully correct as it does more than remove sugar, but it is the right thing to do for most of the things that we care about. We can change this back once we decide to support atomic types more comprehensively. Reviewers: teemperor, shafik Subscribers: jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71262
* [lldb][NFC] Don't implement ClangASTContext::SetMetadata again as a static ↵Raphael Isemann2019-12-122-13/+9
| | | | | | | method We always have an ClangASTContext when we call this method so we might as well always call the non-static version.
* [lldb/CMake] Simplify linking against cursesJonas Devlieghere2019-12-112-9/+5
| | | | | | Centralize the logic to determine what libraries to link against for curses in the CMake file where it is actually being used. Use target_include_directories instead of include_directories.
* [lldb/Host] Use Host/Config.h for LibXML2 instead of a global defineJonas Devlieghere2019-12-114-34/+38
| | | | | Rename LIBXML2_DEFINED to LLDB_ENABLE_LIBXML2 and pass it through Config.h instead of a global define.
* [lldb][dotest] Add `#include <algorithm>` to libc++ detectionJordan Rupprecht2019-12-111-1/+1
| | | | | | | | | | | | Summary: Speculative fix after 34ef51b5f979 broke the lldb buildbot on libc++ tests. Reviewers: echristo, EricWF Subscribers: ldionne, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71376
* [lldb][dotest] Improve libc++ detectionJordan Rupprecht2019-12-111-3/+10
| | | | | | | | | | | | Summary: The test logic for running libc++ tests only looks to see if `/usr/include/c++/v1` exists. This adds a fallback for including libc++ tests as long as `$(CC) -stdlib=libc++` works. Reviewers: labath, EricWF Subscribers: ldionne, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71319
* Add resurrecting Type Validators to projects.rstAdrian Prantl2019-12-111-0/+9
|
* return-object-by-reference ("non trivial") xfail on arm64 in TestTrivialABI.pyJason Molenda2019-12-113-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't think this test case can be handled correctly on AAPCS64. The ABI says that the caller passes the address of the return object in x8. x8 is a caller-spilled (aka "volatile") register, and the function is not required to preserve x8 or to copy the address back into x8 on function exit like the SysV x86_64 ABI does with rax. (from aapcs64: "there is no requirement for the callee to preserve the value stored in x8") From my quick reading of ABISysV_arm64, I worry that it may actually be using the value in x8 at function exit, assuming it still has the address of the return object - if (is_return_value) { // We are assuming we are decoding this immediately after returning from // a function call and that the address of the structure is in x8 reg_info = reg_ctx->GetRegisterInfoByName("x8", 0); This will work on trivial test programs / examples, but if the function does another function call, or overwrites x8 as a scratch register, lldb will provide incorrect values to the user. ABIMacOSX_arm64 doesn't do this, but it also doesn't flag the value as unavailable so we're providing incorrect values to the user all the time. I expect my fix will be to make ABIMacOSX_arm64 flag the return value as unretrievable, unless I've misread the ABI.
* Remove TypeValidators (NFC in terms of the testsuite)Adrian Prantl2019-12-1126-635/+14
| | | | | | | | This is a half-implemented feature that as far as we can tell was never used by anything since its original inclusion in 2014. This patch removes it to make remaining the code easier to understand. Differential Revision: https://reviews.llvm.org/D71310
* update TestThreadStepOut.py to expect correct source line on arm64.Jason Molenda2019-12-112-3/+3
|
* Don't run expect based tests remotely.Jason Molenda2019-12-112-2/+2
|
* [lldb] Don't search the metadata map three times when retrieving metadataRaphael Isemann2019-12-113-8/+4
| | | | | | HasMetadata checks if our metadata map knows the given object. GetMetadata also does this check and then does another search to actually retrieve the value. This can all just be one lookup.
* [lldb][NFC] Remove dead metadata code in ClangASTSourceProxyRaphael Isemann2019-12-111-12/+0
|
* [lldb][NFC] Remove ClangExternalASTSourceCommon::g_TotalSizeOfMetadataRaphael Isemann2019-12-111-7/+0
| | | | Turns out this counter is doing literally nothing beside counting.
* [lldb][NFC] Cleanup includes in FormatManagerTests.cppRaphael Isemann2019-12-111-13/+0
|
* [lldb/DWARF] Add support for DW_AT_loclists_base&DW_FORM_loclistxPavel Labath2019-12-116-3/+174
| | | | | | | | | | | | | | | | | | | | | | Summary: This adds support for DWARF5 location lists which are specified indirectly, via an index into the debug_loclists offset table. This includes parsing the DW_AT_loclists_base attribute which determines the location of this offset table, and support for new form DW_FORM_loclistx which is used in conjuction with DW_AT_location to refer to the location lists in this way. The code uses the llvm class to parse the offset information, and I've also tried to structure it similarly to how the relevant llvm functionality works. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71268
* Change the mtc Makefile to check $SDKROOT value insteadJason Molenda2019-12-101-3/+8
| | | | | | | | | | of depending on it being set in the environment. Fred's change from October assumed that SDKROOT was set in the environment so that 'xcrun --show-sdk-path' would print the path. If it was passed in as a Makefile variable, it wouldn't be set in the environment and xcrun --show-sdk-path would always show the macOS SDK path. When running the lldb testsuite against an ios device via lit, this seems to be the case.
* Remove unsound caching in LanguageCategoryAdrian Prantl2019-12-101-4/+0
| | | | | | | | Analogous to https://reviews.llvm.org/D71233 it is not safe to cache something that depends on the actual ValueObject in a cache then keys only off the type name. Differential Revision: https://reviews.llvm.org/D71297
* Replace redundant code in LanguageCategory with templates (NFC)Adrian Prantl2019-12-102-152/+62
| | | | Differential Revision: https://reviews.llvm.org/D71296
* [FormatManager] Move Language lookup into the obviously non-cached part (NFC)Adrian Prantl2019-12-101-16/+16
| | | | | | | | | | | | | | This refactoring makes the lookup caching easier to reason about. This has no observable effect although it does slightly change what is being cached. - Before this patch a negative lookup in the LanguageCategory would be cached, but a positive wouldn't. - After this patch LanguageCategory lookups aren't cached by FormatManager, period. (LanguageCategory has its own FormatCache for this!) Differential Revision: https://reviews.llvm.org/D71289
* Do not cache hardcoded formats in FormatManagerAdrian Prantl2019-12-106-13/+65
| | | | | | | | | | | | | | The cache in FormatCache uses only a type name as key. The hardcoded formats, synthetic children, etc inspect an entire ValueObject to determine their eligibility, which isn't modelled in the cache. This leads to bugs such as the one in this patch (where two similarly named types in different files have different hardcoded summary providers). The problem is exaggerated in the Swift language plugin due to the language's dynamic nature. rdar://problem/57756763 Differential Revision: https://reviews.llvm.org/D71233
* [DataFormatters] Change the Get() method to take a LanguageType.Davide Italiano2019-12-104-22/+22
| | | | Suggested by Adrian.
* Skip TestGuiBasic.py on ios etc device testing.Jason Molenda2019-12-101-0/+1
|
* Revert "Temporarily revert [lldb] e81268d - [lldb/Reproducers] Support ↵Eric Christopher2019-12-1013-147/+265
| | | | | | | | | multiple GDB remotes" On multiple retry this issue won't duplicate - will revisit with author if duplication works again. This reverts commit c9e0b354e2749ce7ab553974692cb35c8651a869.
* [TypeCategory] IsApplicable gets a LanguageType, not a ValueObject.Davide Italiano2019-12-102-7/+6
| | | | | | | | | | Reviewers: aprantl, teemperor Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71305
* Skip TestMultilineCompletion.py on ios testsuite runs.Jason Molenda2019-12-101-0/+1
|
* [FormatManager] Add a unittest for GetCandidateLanguages()Davide Italiano2019-12-103-0/+63
| | | | | | | | | | Reviewers: teemperor, JDevlieghere, aprantl, jingham Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71299
* [lldb] Add #include to appease the modules buildVedant Kumar2019-12-101-0/+1
| | | | | | | | | | | | | | | | | This #include appears to be completely unnecessary, but it does fix the following build failure: http://green.lab.llvm.org/green/job/lldb-cmake/4565/consoleText FAILED: tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/MainLoop.cpp.o /Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_CONFIGURATION_RELEASE -DLLDB_USE_OS_LOG -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/Host -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/Host -Itools/lldb/source -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/include -Itools/lldb/include -Iinclude -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include -I/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/../clang/include -Itools/lldb/../clang/include -I/usr/local/include -I/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/. -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2 -Wdocumentation -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/module.cache -fcxx-modules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -UNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/MainLoop.cpp.o -MF tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/MainLoop.cpp.o.d -o tools/lldb/source/Host/CMakeFiles/lldbHost.dir/common/MainLoop.cpp.o -c /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/Host/common/MainLoop.cpp /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/Host/common/MainLoop.cpp:211:7: error: use of undeclared identifier 'ppoll' if (ppoll(read_fds.data(), read_fds.size(), nullptr, &sigmask) == -1 && ^ /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/Host/common/MainLoop.cpp:336:25: error: use of undeclared identifier 'HAVE_SYS_EVENT_H' ret = pthread_sigmask(HAVE_SYS_EVENT_H ? SIG_UNBLOCK : SIG_BLOCK, ^ 2 errors generated.
OpenPOWER on IntegriCloud