summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [debugserver] Set arch based on TARGET_TRIPLEVedant Kumar2019-11-201-4/+4
| | | | | | Use TARGET_TRIPLE instead of LLVM_DEFAULT_TARGET_TRIPLE, as the latter isn't exported by LLVMConfig.cmake, which means arch detection fails if lldb is built separately from llvm.
* [lldb][NFC] Move searching for $__lldb_objc_class into its own functionRaphael Isemann2019-11-202-122/+134
| | | | Same as in commit e7cc833ddafdca10be4ef1322ab96ffee774045b but with $__lldb_objc_class.
* [lldb][NFC] Move searching for $__lldb_class into its own function in ↵Raphael Isemann2019-11-202-94/+117
| | | | ClangExpressionDeclMap
* [lldb][NFC] Move ClangExpressionDeclMap's persistent decl search into its ↵Raphael Isemann2019-11-202-53/+73
| | | | | | | | own function Searching persistent decls is a small subset of the things FindExternalVisibleDecls does. It should be its own function instead of being encapsulated in this `do { } while(false);` pattern.
* [lldb][NFC] Remove unused ClangASTContext::GetUnknownAnyTypeRaphael Isemann2019-11-202-13/+0
|
* [lldb][NFC] Simplify ClangASTContext::GetBasicTypesRaphael Isemann2019-11-204-34/+19
| | | | | static convenience methods that do the clang::ASTContext -> ClangASTContext conversion and handle errors by simply ignoring them are not a good idea.
* [lldb][NFC] Remove ClangASTContext::GetAsDeclContextRaphael Isemann2019-11-203-23/+4
| | | | Everything we pass to this function is already a DeclContext.
* [lldb][NFC] Remove ClangASTContext::FieldIsBitfield overloadRaphael Isemann2019-11-202-14/+4
|
* [lldb][NFC] Remove ClangASTContext::GetUniqueNamespaceDeclaration overloadRaphael Isemann2019-11-203-19/+6
| | | | | | This overload is only used in one place and having static overloads for all methods that only do an additional clang::ASTContext -> ClangASTContext conversion is just not sustainable.
* Reland "[clang] Remove the DIFlagArgumentNotModified debug info flag"Djordje Todorovic2019-11-201-1/+2
| | | | | | | | | | It turns out that the ExprMutationAnalyzer can be very slow when AST gets huge in some cases. The idea is to move this analysis to the LLVM back-end level (more precisely, in the LiveDebugValues pass). The new approach will remove the performance regression, simplify the implementation and give us front-end independent implementation. Differential Revision: https://reviews.llvm.org/D68206
* [Reproducer] Namespace the reproducer dump options.Jonas Devlieghere2019-11-192-3/+3
| | | | Make it clear that the current reproducer options are for dumping.
* [lldb][test] Prevent \n in calls to lldb's expect() test helper.Jordan Rupprecht2019-11-192-17/+15
| | | | | | | | | | | | | | | | | Summary: expect() forwards its command to sendline(). This can be problematic if the command already contains a newline: sendline() unconditionally adds a newline to the command, which causes the command to run twice (hitting enter in lldb runs the previous command). The expect() helper looks for the prompt and finds the first one, but because the command has run a second time, the buffer will contain the contents of the second time the command ran, causing potential erroneous matching. Simplify the editline test, which was using different commands to workaround this misunderstanding. Reviewers: labath Reviewed By: labath Subscribers: merge_guards_bot, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70324
* Add a "Using LLDB" section to the welcome page of the websiteAdrian Prantl2019-11-194-17/+31
| | | | | | | | | | | | | | | This is an attempt to feature the user-facing resources more prominently on the LLDB website by calling out the tutorial and the GDB command map wight on the start page. I also moved the "Why a new debugger" section to the "Goals" subpage. Given that LLDB's first release is almost a decade in the past now, the title is a bit of an anachronism. Lastly, I moved the Architecture sub-page from "use" to "resources", since end-users do not care about the source code layout. Differential Revision: https://reviews.llvm.org/D70449
* [LLDB] Fix formatting in the driver (NFC)Jonas Devlieghere2019-11-191-2/+1
|
* [lldb] Add logging to IRExecutionUnit::GetStaticInitializersRaphael Isemann2019-11-191-6/+21
|
* [lldb][NFC] Early exit in IRExecutionUnit::GetStaticInitializersRaphael Isemann2019-11-191-24/+28
|
* [lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.pyRaphael Isemann2019-11-191-0/+14
| | | | | | I just used the mangled names as this test is anyway a Darwin-only ObjC++ test. We probably should also test this on other platforms but that will be another commit as we need to untangle the ObjC and C++ parts first.
* [lldb] Remove ClangExpressionDeclMap::ResolveUnknownTypesRaphael Isemann2019-11-194-93/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This is some really shady code. It's supposed to kick in after an expression already failed and then try to look up "unknown types" that for some undocumented reason can't be resolved during/before parsing. Beside the fact that we never mark any type as `EVUnknownType` in either swift-lldb or lldb (which means this code is unreachable), this code doesn't even make the expression evaluation succeed if if would ever be executed but instead seems to try to load more debug info that maybe any following expression evaluations might succeed. This patch removes ClangExpressionDeclMap::ResolveUnknownTypes and the related data structures/checks/calls. Reviewers: davide Reviewed By: davide Subscribers: aprantl, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70388
* Mark PR44037 tests as XFAIL on AArch64 Linux dwoDiana Picus2019-11-194-1/+24
| | | | | | | | | | | | These tests are failing with various assertion failures, but they all throw the following error message first: error: a.out 0x0000002d: adding range [0x14-0x24) which has a base that is less than the function's low PC 0x40060c. See llvm.org/pr44037. Differential Revision: https://reviews.llvm.org/D70381
* [lldb-server] Use LLDB_LOG_ERROR to consume Error<> even if logging is disabledMartin Storsjö2019-11-193-12/+12
| | | | Differential Revision: https://reviews.llvm.org/D70386
* Revert "[CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types."Jonas Devlieghere2019-11-181-12/+0
| | | | Whoops, they should be enabled, not disabled.
* [CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types.Jonas Devlieghere2019-11-181-0/+6
| | | | | | We're checking for support but we're discarding the result. My best guess is that these warnings were disabled in the past. However, I don't see a reason to keep it that way.
* [Docs] Add reproducer documentationJonas Devlieghere2019-11-182-0/+117
| | | | | | | | This adds a page about LLDB reproducers. It describes how to use the reproducers on the command line and lists some of the known issues/limitations. Differential revision: https://reviews.llvm.org/D70409
* [lldb] [test] XFAIL more lldb-server tests on NetBSDMichał Górny2019-11-181-0/+11
|
* [lldb] [test] Mark segv-related tests XFAIL on NetBSDMichał Górny2019-11-183-0/+3
| | | | | There seems to be a regression in the kernel causing those tests to fail. Mark them XFAIL, to be addressed later.
* [lldb] [unittest] Skip TestStopReplyContainsThreadPcs on NetBSDMichał Górny2019-11-181-1/+7
|
* [lldb] [unittest] Reenable MainLoopTest.DetectsEOF on NetBSDMichał Górny2019-11-181-4/+0
| | | | | The underlying issue is already fixed in the NetBSD kernel for some time, so we can finally reenable the test.
* [Signal] Allow llvm clients to opt into one-shot SIGPIPE handlingVedant Kumar2019-11-182-21/+2
| | | | | | | | | | | | | | | | | | | | Allow clients of the llvm library to opt-in to one-shot SIGPIPE handling, instead of forcing them to undo llvm's SIGPIPE handler registration (which is brittle). The current behavior is preserved for all llvm-derived tools (except lldb) by means of a default-`true` flag in the InitLLVM constructor. This prevents "IO error" crashes in long-lived processes (lldb is the motivating example) which both a) load llvm as a dynamic library and b) *really* need to ignore SIGPIPE. As llvm signal handlers can be installed when calling into libclang (say, via RemoveFileOnSignal), thereby overriding a previous SIG_IGN for SIGPIPE, there is no clean way to opt-out of "exit-on-SIGPIPE" in the current model. Differential Revision: https://reviews.llvm.org/D70277
* Replace bitfield in lldb::Type with byte-sized members. (NFC)Adrian Prantl2019-11-185-89/+74
| | | | | | Due to alginment and packing using separate members takes up the same amount of space, but makes it far less cumbersome to deal with it in constructors etc.
* [Docs] Add Python caveats under the development sectionJonas Devlieghere2019-11-183-0/+43
| | | | | | | | | | | This adds a page named Caveats with a section on some of the things to be aware of related to Python. It's a question we've seen more than once pop up and I think it's good to have it documentation on the website. Even though some of it might be useful to users, I still put it under "development" because it requires some understanding of how LLDB is built. Differential revision: https://reviews.llvm.org/D70252
* [lldb] Fix JSON parser to allow empty arraysAlex Cameron2019-11-184-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=39405 ``` alexc@kitty:~/work/wiredtiger/build_posix$ cat breakpoint.json [{"Breakpoint" : {"BKPTOptions" : {"AutoContinue" : false,"ConditionText" : "","EnabledState" : true,"IgnoreCount" : 0,"OneShotState" : false},"BKPTResolver" : {"Options" : {"NameMask" : [56],"Offset" : 0,"SkipPrologue" : true,"SymbolNames" : ["__wt_btcur_search"]},"Type" : "SymbolName"},"Hardware" : false,"SearchFilter" : {"Options" : {},"Type" : "Unconstrained","Foo" : []}}}] ``` **Before** ``` (lldb) breakpoint read --file breakpoint.json error: Invalid JSON from input file: /home/alexc/work/wiredtiger/build_posix/breakpoint.json. ``` **After** ``` (lldb) breakpoint read --file breakpoint.json New breakpoints: Breakpoint 1: where = libwiredtiger-3.2.2.so`__wt_btcur_search + 15 at bt_cursor.c:522:5, address = 0x00007ffff576ab2f ``` Reviewers: xbolva00, davide, labath Reviewed By: davide, labath Subscribers: mgorny, jingham, labath, davide, JDevlieghere, lldb-commits Tags: #llvm, #lldb Differential Revision: https://reviews.llvm.org/D68179
* [lldb][NFC] Cleanup comments in ClangASTSource.hRaphael Isemann2019-11-181-22/+23
| | | | | The current file doesn't follow the 80 character limit and uses this cramped comment style that is hard to read.
* [lldb] [Process/NetBSD] Implement thread name gettingMichał Górny2019-11-183-3/+39
| | | | | | | Implement thread name getting sysctl() on NetBSD. Also fix the incorrect type in pthread_setname_np() in the relevant test. Differential Revision: https://reviews.llvm.org/D70363
* [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILsMichał Górny2019-11-1811-2/+28
| | | | Differential Revision: https://reviews.llvm.org/D70335
* Remove +x permission on some filesSylvestre Ledru2019-11-161-0/+0
|
* [lldb-vscode] support the completion requestWalter Erquinigo2019-11-157-3/+302
| | | | | | | | | | | | | | | | Summary: The DAP has a completion request that has been unimplemented. It allows showing autocompletion tokens inside the Debug Console. I implemented it in a very simple fashion mimicking what the user would see when autocompleting an expression inside the CLI. There are two cases: normal variables and commands. The latter occurs when a text is prepepended with ` in the Debug Console. These two cases work well and have tests. Reviewers: clayborg, aadsm Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69873
* Avoid including Builtins.h in Preprocessor.hReid Kleckner2019-11-151-0/+1
| | | | | | Builtins are rarely if ever accessed via the Preprocessor. They are typically found on the ASTContext, so there should be no performance penalty to using a pointer indirection to store the builtin context.
* Fix -Wunused-result warnings in LLDBReid Kleckner2019-11-152-4/+4
| | | | | | | | | | Three uses of try_lock intentionally ignore the result, as explained in the comment. Make that explicit with a void cast. Add what appears to be a missing return in the clang expression parser code. It's a functional change, but presumably the right one. Differential Revision: https://reviews.llvm.org/D70281
* Add a testcase for Clang modules being updated within one LLDB session.Adrian Prantl2019-11-157-3/+91
| | | | This actually works as expected, but wasn't explicitly tested before.
* dotest: Add a way for the run_to_* helpers to register dylibsFred Riss2019-11-152-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To run the testsuite remotely the executable needs to be uploaded to the target system. The Target takes care of this by default. When the test uses additional shared libraries, those won't be handled by default and need to be registered with the target using test.registerSharedLibrariesWithTarget(target, dylib). Calling this API requires a target, so it doesn't mesh well with the run_to_* helpers that we've been advertising as the right way to write tests. This patch adds an extra_images argument to all the helpers and does the registration automatically when running a remote testsuite. TestWeakSymbols.py was converted to use this new scheme. Reviewers: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70134
* [-gmodules] Let LLDB log a warning if the Clang module hash mismatches.Adrian Prantl2019-11-159-18/+169
| | | | | | | | This feature is mostly there to aid debugging of Clang module issues, since the only useful actual the end-user can to is to recompile their program. Differential Revision: https://reviews.llvm.org/D70272
* Add RTTI support to the SymbolFile class hierarchyAdrian Prantl2019-11-1519-1/+115
| | | | Differential Revision: https://reviews.llvm.org/D70322
* Rename posix/FileSystem.cpp to FileSystemPosix.cppAdrian Prantl2019-11-152-1/+1
| | | | to avoid a linker warning on Darwin about two files having the same name.
* [CMake] Configure the Info.plist so it contains a real version number.Jonas Devlieghere2019-11-154-3/+17
| | | | | Use CMake to configure the Info.plist file so that we have a real version number in things like crash reporter.
* Comment the fact that DWARFDebugInfoEntry isn't copyable.Adrian Prantl2019-11-151-0/+4
|
* Fix TestFormatters.py stepping too farDiana Picus2019-11-152-6/+5
| | | | | | | | | | | | | TestFormatters.py has a sequence of three 'next' commands to get past all the initializations in the test function. On AArch64 (and potentially other platforms), this was one 'next' too many and we ended up outside our frame. This patch replaces the sequence with a 'thread until ' the line of the return from the function, so we should stop after all the initializations but before actually returning. Differential Revision: https://reviews.llvm.org/D70303
* [Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]Davide Italiano2019-11-141-193/+0
|
* [LLDB] Fix more -Wdocumentation issues (NFC)Jonas Devlieghere2019-11-147-31/+31
|
* [Reproducer] Enable crash reports for reproducer testsJonas Devlieghere2019-11-141-0/+2
| | | | | | | | | | | | | For some reason the reproducer tests seem really proficient at uncovering structural issues in LLDB related to how we tear down things, but of course only on the bots. The pretty stack trace helps a bit, but what I really want is the crash reports which contain much more information, such as what other threads we doing. Crash reports are automatically suppressed by lit. This patch (temporarily) disables that for the reproducer tests.
* [lldb][Editline] Support ctrl+left/right arrow word navigation.Jordan Rupprecht2019-11-142-0/+58
| | | | | | | | | | | | | | | | | Summary: This adds several 5C/5D escape codes that allow moving forward/backward words similar to bash command line navigation. On my terminal, `ctrl+v ctrl+<left arrow>` prints `^[[1;5D`. However, it seems inputrc also maps other escape variants of this to forward/backward word, so I've included those too. Similar for 5C = ctrl+right arrow. Reviewers: JDevlieghere, labath Reviewed By: JDevlieghere, labath Subscribers: merge_guards_bot, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70137
OpenPOWER on IntegriCloud