summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] [lit] Pass -pthread on NetBSD as wellMichal Gorny2019-03-021-1/+1
| | | | llvm-svn: 355274
* [lldb] [lldbtest] Fix getBuildFlags() not to use libstdc++ on NetBSDMichal Gorny2019-03-021-1/+2
| | | | | | | | | | Remove the code forcing -stdlib=libstdc++ on NetBSD in getBuildFlags() method. NetBSD uses libc++ everywhere else, and using libstdc++ here causes lang/cpp/dynamic-value to fail to build. Differential Revision: https://reviews.llvm.org/D58871 llvm-svn: 355273
* Fix gcc build for r355249Pavel Labath2019-03-021-1/+1
| | | | | | | automatic move should not fire when returning type T in a function with result type Expected<T>. Some compilers seem to allow that nonetheless. llvm-svn: 355270
* [Reproducers] Capture and replay interpreter commands.Jonas Devlieghere2019-03-0211-35/+207
| | | | | | | | | | | | | | | | | This patch adds the necessary logic to capture and replay commands entered into the command interpreter. A DataRecorder shadows the input and writes its data to a know file. During replay this file is used as the command interpreter's input. It's possible to the command interpreter more than once, with a different input source. We support this scenario by using multiple buffers. The synchronization for this takes place at the SB layer, where we create a new recorder every time the debugger input is changed. During replay we use the corresponding buffer as input. Differential revision: https://reviews.llvm.org/D58564 llvm-svn: 355249
* Delete commented-out code.Adrian Prantl2019-03-011-6/+0
| | | | llvm-svn: 355238
* Resubmit r354706 with a fix for process launch.Jim Ingham2019-03-0112-63/+121
| | | | | | | | | | | | | | | When the debugger is run in sync mode, you need to be able to tell whether a hijacked resume is for some special purpose (like waiting for the SIGSTOP on attach) or just to perform a synchronous resume. Target::Launch was doing that wrong, and that caused stop-hooks on process launch in source files to behave incorrectly. <rdar://problem/48115661> Differential Revision: https://reviews.llvm.org/D58727 llvm-svn: 355213
* Update com.apple.diagnosticd.diagnostic entitlementJason Molenda2019-03-014-4/+4
| | | | | | | | name to the newer com.apple.private.logging.diagnostic. <rdar://problem/47183116> llvm-svn: 355170
* Increase timeout in Symbols::DownloadObjectAndSymbolFile Jason Molenda2019-03-011-1/+1
| | | | | | | | | | from 30 seconds to 120 seconds. We've seen cases where this symbol lookup can exceed 30 seconds for people working remotely. <rdar://problem/48460476> llvm-svn: 355169
* Symbols.cpp in unittest moved too.Jason Molenda2019-02-281-4/+4
| | | | llvm-svn: 355155
* [CMake] Make liblldb depend on clang-headersAlex Langford2019-02-281-0/+4
| | | | | | | | | | | Summary: The clang headers are useful when dealing with clang modules. There is also a way to get to the clang headers from the SB API so it would be nice if they were also available when we just build lldb. Differential Revision: https://reviews.llvm.org/D58793 llvm-svn: 355149
* Improve process launch comments for WindowsAdrian McCarthy2019-02-281-3/+7
| | | | | | | | | | | | | The existing comment about over-allocating the command line was incorrect. The contents of the command line may be changed, but it's not necessary to over allocate. The changes will be limited to the existing contents of the string (e.g., by replacing spaces with L'\0' to tokenize the command line). Also added a comment explaining a possible cause of failure to save the next programmer some time when they try to debug a 64-bit process from a 32-bit LLDB. llvm-svn: 355121
* [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central placePavel Labath2019-02-283-25/+24
| | | | | | | | | | | | | This was previously scattered between the main CMakeLists.txt file and LLDBGenerateConfig.cmake and LLDBConfig.cmake. This caused the some of the code to be executed in incorrect order. Specifically, the check for el_winsertstr was done before libedit_LIBRARIES was computed, and so it always failed on the first run. Moving it the two checks to a central place makes sure this doesn't happen again and improves the overall readability. llvm-svn: 355103
* Move Symbols.cpp files.Jason Molenda2019-02-281-8/+9
| | | | llvm-svn: 355063
* [Reprodicuers] Check initializationJonas Devlieghere2019-02-281-0/+4
| | | | | | | If the reproducer is not initialzied, the call to ::Instance() will result in an assertion. llvm-svn: 355055
* Remove unnecessary demangling operation (NFC)Adrian Prantl2019-02-271-7/+5
| | | | | | | | | | | | This extra call to the demangler doesn't affect the performance of C++ because the result is being cached anyway; but I'm working on a patch to the Swift branch that uses extra contextual information to provide a more accurate demangling result. In that case this call would be extra and unnecessary work. Differential Revision: https://reviews.llvm.org/D58720 llvm-svn: 355042
* Remove dependency from Host -> Core.Zachary Turner2019-02-271-1/+0
| | | | | | | I wasn't actually trying to eliminate this one, but looks like it happened as a side effect of moving Symbols out of Host. llvm-svn: 355037
* Move Host/Symbols.cpp to Symbols/LocateSymbolFile.cppZachary Turner2019-02-2718-33/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Given that we have a target named Symbols, one wonders why a file named Symbols.cpp is not in this target. To be clear, the functions exposed from this file are really focused on *locating* a symbol file on a given host, which is where the ambiguity comes in. However, it makes more sense conceptually to be in the Symbols target. While some of the specific places to search for symbol files might change depending on the Host, this is not inherently true in the same way that, for example, "accessing the file system" or "starting threads" is fundamentally dependent on the Host. PDBs, for example, recently became a reality on non-Windows platforms, and it's theoretically possible that DSYMs could become a thing on non MacOSX platforms (maybe in a remote debugging scenario). Other types of symbol files, such as DWO, DWP, etc have never been tied to any Host platform anyway. After this patch, there is only one remaining dependency from Host to Target. Differential Revision: https://reviews.llvm.org/D58730 llvm-svn: 355032
* Pass arguments correctly to the objc object checker on arm64Jim Ingham2019-02-273-2/+39
| | | | | | | | | | | | | | | | | Traditionally objc had two entry points, objc_msgSend for scalar return methods, and objc_msgSend_stret for struct return convention methods. But on arm64 the second was not needed (since arm64 doesn't use an argument register for the struct return pointer) so it was removed. The code that dispatches to the objc object checker when it sees some flavor of objc_msgSend was not aware of this change so was sending the wrong arguments to the checker. <rdar://problem/48315890> Differential Revision: https://reviews.llvm.org/D58699 llvm-svn: 355026
* [Reproducer] Make 'reproducer generate' a NOOP during replay.Jonas Devlieghere2019-02-271-0/+5
| | | | | | | Instead of filtering out the 'reproducer generate' command during replay, just make the operation a NOOP. llvm-svn: 355009
* [Reproducers] Add more logging to reproducer instrumentationJonas Devlieghere2019-02-272-16/+87
| | | | | | | | | | | Debugging issues with instrumentation capture and replay can be particularly tricky, especially because part of the process takes places even before the debugger is initialized. This patch adds more logging capabilities to these classes, hidden behind a macro define. Differential revision: https://reviews.llvm.org/D58566 llvm-svn: 355002
* Remove XFAIL-Linux from two asan testsPavel Labath2019-02-272-6/+0
| | | | | | | | It turns out these tests actually succeed, if one has a clang with address sanitizer support enabled (i.e., has enabled the compiler-rt project). I guess none of the linux lldb devs have done that until now. llvm-svn: 354976
* Insert blocks of python code with swig instead of modify-python-lldb.pyPavel Labath2019-02-274-125/+98
| | | | | | | | | | | | | | | | | | | Summary: Swig is perfectly capable of inserting blocks of python code into its output (and we use those fascilities already), so there's no need for this to be done in a post-process step. lldb_iter is a general-purpose utility used from many classes, so I add it to the main swig file. The other two blocks are tied to a specific class, so I add it to the interface file of that class. Reviewers: zturner, jingham, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58350 llvm-svn: 354975
* [Utility] Fix ArchSpec.MergeFrom to correctly merge environmentsAlex Langford2019-02-272-19/+42
| | | | | | | | | | | | | | | | Summary: This behavior was originally added in rL252264 (git commit 76a7f365da) in order to be extra careful with handling platforms like watchos and tvos. However, as far as triples go, those two (and others) are treated as OSes and not environments, so that should not really apply here. Additionally, this behavior is incorrect and can lead to incorrect ArchSpecs. Because android is specified as an environment and not an OS, not propogating the environment can lead to modules and targets being misidentified. Differential Revision: https://reviews.llvm.org/D58664 llvm-svn: 354938
* [Utility] Remove Triple{Environment,OS,Vendor}IsUnspecifiedUnknown from ArchSpecAlex Langford2019-02-264-17/+79
| | | | | | | | | | | | | | Summary: These functions should always return the opposite of the `Triple{Environment,OS,Vendor}WasSpecified` functions. Unspecified unknown is the same as unspecified, which is why one set of functions should give us what we want. It's possible to have specified unknown, which is why we can't just rely on checking the enum values of vendor/os/environment. We must also ensure that the names of these are empty and not "unknown". Differential Revision: https://reviews.llvm.org/D58653 llvm-svn: 354933
* [lldb] [unittests] Use non-empty format string for Timer()Michal Gorny2019-02-261-5/+5
| | | | | | | | | | | Pass dummy '.' as format string for Timer() rather than an empty string, in order to silence gcc warnings about empty format string (-Wformat-zero-length). The actual format string is irrelevant to the test in question. Differential Revision: https://reviews.llvm.org/D58680 llvm-svn: 354922
* [lldb] [lit] Set LD_LIBRARY_PATH or alike for Suite testsMichal Gorny2019-02-262-0/+24
| | | | | | | | | | | | | | | | Set LD_LIBRARY_PATH or local platform's equivalent of it when running the 'Suite' tests. This is necessary when running tests inside build tree with BUILD_SHARED_LIBS enabled, in order to make the LLDB modules load freshly built LLVM libraries. The code is copied from clang (test/Unit/lit.cfg). SHLIBDIR substitution is added to site-config (already present in top-level LLDB site-config) to future-proof this into supporting stand-alone builds with shared LLDB libraries. Differential Revision: https://reviews.llvm.org/D58610 llvm-svn: 354920
* Mention predicting exception catch at throw siteJim Ingham2019-02-262-0/+47
| | | | llvm-svn: 354914
* Fix short options syntax in Minidump testTatyana Krasnukha2019-02-261-20/+20
| | | | llvm-svn: 354890
* Fix error handling in Options::ParseTatyana Krasnukha2019-02-261-2/+3
| | | | | | | Moved `if (error.Fail())` to correct place to catch all faulty cases such as "unknown or ambiguous option" which was ignored before. llvm-svn: 354883
* [lldb-mi] Return source line number in proper formatTatyana Krasnukha2019-02-251-1/+1
| | | | | | | | | Line number is a decimal number and is printed as such, however for some reason it was prefixed with '0x', thus turning printed value invalid. Patch by Anton Kolesov <Anton.Kolesov@synopsys.com> llvm-svn: 354804
* [lldb-mi] Fix conversion warning for 64-bit buildTatyana Krasnukha2019-02-251-1/+1
| | | | llvm-svn: 354803
* [lldb-mi] Check raw pointers before passing them to std::string ctor/assignmentTatyana Krasnukha2019-02-2512-23/+78
| | | | | | Differential Revision: https://reviews.llvm.org/D55653 llvm-svn: 354798
* Finish revert of r354706Pavel Labath2019-02-251-2/+0
| | | | | | The revert in r354711 wasn't complete. Finish the job. llvm-svn: 354766
* Revert r354706 - lit touched my thighJim Ingham2019-02-2312-99/+41
| | | | llvm-svn: 354711
* Make sure that stop-hooks run asynchronously.Jim Ingham2019-02-2312-39/+99
| | | | | | | | | | | | | | They aren't designed to nest recursively, so this will prevent that. Also add a --auto-continue flag, putting "continue" in the stop hook makes the stop hooks fight one another in multi-threaded programs. Also allow more than one -o options so you can make more complex stop hooks w/o having to go into the editor. <rdar://problem/48115661> Differential Revision: https://reviews.llvm.org/D58394 llvm-svn: 354706
* When deserializing breakpoints some options may not be present.Jim Ingham2019-02-222-15/+16
| | | | | | | | | | | The deserializer was not handling this case. For now we just accept the absent option, and set it to the breakpoint default. This will be more important if/when I figure out how to serialize the options set on breakpont locations. <rdar://problem/48322664> llvm-svn: 354702
* Avoid two-stage initialization of MinidumpParserPavel Labath2019-02-226-217/+187
| | | | | | | | | remove the Initialize function, move the things that can fail into the static factory function. The factory function now returns Expected<Parser> instead of Optional<Parser> so that it can give a reason why creation failed. llvm-svn: 354668
* Split up minidump register context testsPavel Labath2019-02-223-123/+230
| | | | | | | | | | | | | | | | | The tests were doing two somewhat independent things: - checking that the registers can be retrieved from the minidump file - checking that they can be converted into a form suitable for consumption by lldb The first thing requires a minidump file (but it's independent of other lldb structures), while the second one does not require a minidump file (but it needs lldb register info structures). Splitting this into two tests gives an opportunity to write more detailed tests, and allows the two pieces of functionality to be moved into different packages, if that proves to be necessary. llvm-svn: 354662
* Revert "[xcodeproj] Add SBReproducer to LLDB.framework"Jonas Devlieghere2019-02-221-9/+0
| | | | | | This was bogus. llvm-svn: 354639
* [xcodeproj] Add SBReproducer to LLDB.frameworkJonas Devlieghere2019-02-211-0/+9
| | | | llvm-svn: 354637
* [Reproducers] Initialize reproducers before initializing the debugger.Jonas Devlieghere2019-02-2130-191/+86
| | | | | | | | | | | | | | | | As per the discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20190218/048007.html This commit implements option (3): > Go back to initializing the reproducer before the rest of the debugger. > The method wouldn't be instrumented and guarantee no other SB methods are > called or SB objects are constructed. The initialization then becomes part > of the replay. Differential revision: https://reviews.llvm.org/D58410 llvm-svn: 354631
* [lldb] [test] Do not link -ldl on NetBSDMichal Gorny2019-02-213-2/+12
| | | | | | | | | | | | | | | | Fix the load_* using test Makefiles not to link -ldl on NetBSD. There is no such a library on NetBSD, and dlopen() is available without a library. Quoting the manpage: (These functions are not in a library. They are included in every dynamically linked program automatically.) To resolve this portably, introduce a new USE_LIBDL option. If it set to 1, Makefile.rules automatically appends -ldl on platforms needing it. Differential Revision: https://reviews.llvm.org/D58517 llvm-svn: 354617
* [unittest] Fix missing user-provided default constructorJonas Devlieghere2019-02-211-0/+2
| | | | | | | error: default initialization of an object of const type 'const Pod' without a user-provided default constructor llvm-svn: 354602
* testsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with ↵Jan Kratochvil2019-02-212-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symlinked build dir Getting failure when building in a directory which is symlinked elsewhere: Failing Tests (1): lldb-Suite :: functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py lldb-Suite :: source-manager/TestSourceManager.py For TestCompDirSymLink: ------------------------------------------------------------------------------ runCmd: file .../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink output: Current executable set to '.../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink' (x86_64). runCmd: settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd output: None runCmd: breakpoint set -f ".../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/relative.cpp" -l 11 output: Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. It is because /proc/self/cwd (used above for plugin.symbol-file.dwarf.comp-dir-symlink-paths) points to an already resolved directory: (cd /tmp;mkdir real;ln -s real symlink;cd symlink;ls -l /proc/self/cwd) lrwxrwxrwx 1 jkratoch jkratoch 0 Feb 20 19:55 /proc/self/cwd -> /tmp/real/ ------------------------------------------------------------------------------ For TestSourceManager the resolving is done by 'make -C' as found by Pavel Labath. Differential Revision: https://reviews.llvm.org/D58465 llvm-svn: 354556
* Revert "[lldb-mi] Move TestMIPrompt away from pexpect()."Davide Italiano2019-02-212-17/+58
| | | | | | | I see a test failing on the macOS bots. I can't reproduce locally, so try to get the bots green before I can investigate. llvm-svn: 354540
* Merge target triple into module triple when constructing module from memoryAlex Langford2019-02-201-0/+4
| | | | | | | | | | | | | | | | | | | Summary: While debugging an android process remotely from a windows machine, I noticed that the modules constructed from an object file in memory only had information about the architecture. Without knowledge of the OS or environment, expression evaluation sometimes leads to incorrectly generated code or a debugger crash. While we cannot know for certain what triple a module constructed from an in-memory object file will have, we can use the triple from the target to try and fill in the missing details. Reviewers: clayborg, zturner, JDevlieghere, compnerd, aprantl, labath Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58405 llvm-svn: 354526
* [lldb-mi] Move TestMIPrompt away from pexpect().Davide Italiano2019-02-202-58/+17
| | | | llvm-svn: 354506
* [lldb-mi] Remove a test that uses pexpect().Davide Italiano2019-02-201-82/+0
| | | | | | | | | | | | | | | | Summary: Its functionality is entirely covered by exec-run.test (which doesn't use pexpect) Reviewers: serge-sans-paille Subscribers: ki.stfu, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58459 llvm-svn: 354494
* [TestModuleCXX] Make this test Darwin-only.Jonas Devlieghere2019-02-201-1/+1
| | | | | | | Apparently this functionality is not expected to work on non-Darwin systems. I should've checked the decorator on the original test. llvm-svn: 354487
* [lldb] [test] Fix expected netbsd output for TestImageListMultiArchitectureMichal Gorny2019-02-201-1/+1
| | | | llvm-svn: 354483
OpenPOWER on IntegriCloud