summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] Make Target* a Target& in CommandObjectExpression::DoExecute REPL logicRaphael Isemann2019-11-081-49/+47
| | | | | | | | Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70002
* [lldb][NFC] Refactor some IsClangType checks in ClangASTContextRaphael Isemann2019-11-082-2/+6
| | | | | | | | | | | | | | | Summary: All type in these functions need be valid and Clang types, so we might as well replace these checks with IsClangType. Also lets IsClangType explicitly check for validity instead of assuming that the TypeSystem is a nullptr. Subscribers: abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70001
* Reordering KextImageInfo::LoadImageUsingMemoryModuleJason Molenda2019-11-071-9/+15
| | | | | | | | | | | | so we only call ModulesDidLoad at the end of the method after the new module has been added to the target and the sections have all been adjusted to their actual load addresses. Solves a problem where an operating system plugin in the kernel could be loaded multiple times; the first before the binary had even been added to the target. <rdar://problem/50523558>
* Modernize TestWeakSymbols MakefileFred Riss2019-11-071-20/+15
|
* BreakpointDummyOptionGroup was using g_breakpoint_modify_options rather than ↵Jim Ingham2019-11-073-1/+25
| | | | | | | | | | g_breakpoint_dummy_options causing the -D option for breakpoint set command to be incorrectly parsed. Patch by Martin Svensson. Differential Revision: https://reviews.llvm.org/D69425
* [lldb] Improve assert in GDBRemoteCommunicationReplayServerJonas Devlieghere2019-11-071-1/+8
| | | | | | | | | | | | While investigating an issue where a different packet was sent during replay I noticed how annoying it is that the existing assert doesn't specify what packet is actually different. It's printed to the log, but enabling logging has the potential to change LLDB's behavior. The same is true when debugging LLDB while it's replaying the reproducer. I replaced the assert with a printf of the unexpected packet followed by a fatal_error wrapped in ifndef NDEBUG. The behavior is the same as the previous assert, just with more/better context.
* crashlog.py: Improve regular expressionsAdrian Prantl2019-11-072-13/+63
| | | | | | | | | | | | | | | | | | | This is yet another change to the regular expressions in crashlog.py that fix a few edge cases, and attempt to improve the readability quite a bit in the process. My last change to support spaces in filenames introduced a bug that caused the version/archspec field to be parsed as part of the image name. For example, in "0x1111111 - 0x22222 +MyApp Pro arm64 <01234>", the name of the image was recognized as "MyApp Pro arm64" instead of "MyApp Pro" with a "version" of arm64. The bugfix makes the space following an optional field mandatory *inside* the optional group. rdar://problem/56883435 Differential Revision: https://reviews.llvm.org/D69871
* [lldb] Comment typo fixJan Kratochvil2019-11-071-1/+1
|
* [lldb] Add -m option to 'target modules dump symtab' to disable demanglingRaphael Isemann2019-11-078-16/+86
| | | | | | | | | | | | | | Summary: This option was added downstream in swift-lldb. This upstreams this option as it seems useful and also adds the missing tests. Reviewers: #lldb, kwk, labath Reviewed By: kwk, labath Subscribers: labath, kwk, abidh, JDevlieghere, lldb-commits Tags: #lldb, #upstreaming_lldb_s_downstream_patches Differential Revision: https://reviews.llvm.org/D69944
* [lldb-server] Add setting to force 'g' packet useGuilherme Andrade2019-11-0710-21/+127
| | | | | | | | | | | | Following up on https://reviews.llvm.org/D62221, this change introduces the settings plugin.process.gdb-remote.use-g-packet-for-reading. When they are on, 'g' packets are used for reading registers. Using 'g' packets can improve performance by reducing the number of packets exchanged between client and server when a large number of registers needs to be fetched. Differential revision: https://reviews.llvm.org/D62931
* [LLDB] Adding caching to libc++ std::function formatter for lookups that ↵shafik2019-11-064-26/+84
| | | | | | | | | | require scanning symbols Performance issues lead to the libc++ std::function formatter to be disabled. This change is the first of two changes that should address the performance issues and allow us to enable the formatter again. In some cases we end up scanning the symbol table for the callable wrapped by std::function for those cases we will now cache the results and used the cache in subsequent look-ups. This still leaves a large cost for the initial lookup which will be addressed in the next change. Differential Revision: https://reviews.llvm.org/D67111
* [lldb] Mark ASan & TSan as test dependenciesJonas Devlieghere2019-11-061-1/+9
| | | | | | Without asan and tsan as test dependencies, you might end up with a clang that points to sanitizer runtime library that hasn't been build yet.
* [test] Fix apple_simulator_test decorator when simulators are unavailableAlex Langford2019-11-061-1/+1
| | | | | In the case where xcodebuild fails as you set up simulator tests, you would fail because `feature` is never defined.
* [lldb] Remove dead code from STLUtils.hJonas Devlieghere2019-11-066-55/+3
|
* Testuite: Support Asan test with remote testingFred Riss2019-11-063-8/+18
| | | | | | To do so, we need to register the sanitizer libraries with the target so that they get uploaded before running. This patch adds a helper to the test class to this effect.
* [LLDB] Fix handling for the clang name mangling extension for block invocationsshafik2019-11-065-23/+50
| | | | | | Add support for clangs mangling extension for block invocations. Differential Revision: https://reviews.llvm.org/D69738
* [lldb] Record framework build path and use it everywhereHaibo Huang2019-11-068-24/+15
| | | | This avoids config time dependencies on liblldb. And enables other refactoring.
* lldb/docs: update the lldb-x86_64-debian bot urlPavel Labath2019-11-061-1/+1
| | | | It is on the "stable" master now.
* lldb: Skip reproducer+expression evaluation test on linuxPavel Labath2019-11-061-0/+3
| | | | It's flaky.
* Silence warning, PyMODINIT_FUNC already contains extern "C"Benjamin Kramer2019-11-061-1/+1
| | | | PythonReadline.h:22:12: warning: duplicate 'extern' declaration specifier [-Wduplicate-decl-specifier]
* [TestMTCSimple] Disable the test if you don't have libMTCAlex Langford2019-11-051-1/+5
| | | | | | If you are running on macOS and have the CommandLineTools installed of Xcode, this test will fail because CommandLineTools doesn't ship with libMainThreadChecker. Skip the test if you don't have it installed.
* [lldb] Add a install target for lldb python on darwinHaibo Huang2019-11-051-12/+15
| | | | | | | | | | | | Summary: Similar to D68370 but for darwin framework build. Reviewers: aadsm Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69834
* [ValueObject] Upstream early exit from swift-lldb. (NFC)Adrian Prantl2019-11-051-0/+4
|
* [ValueObject] Upstream initialization from swift-lldb.Adrian Prantl2019-11-051-0/+10
| | | | | | | This is a non-Swift-specific change in swift-lldb that seems to be useful for remote debugging. If does in fact turn out to be redundant we can remove it from llvm.org and then it will disappear in swift-lldb, too.
* [Reproducer] Add test case for expression evaluationJonas Devlieghere2019-11-052-0/+28
|
* TestBatchMode.py: add missing @skipIfRemoteFred Riss2019-11-051-0/+1
| | | | | All the tests in this file were already marked as skipped for remote tests except for this one.
* testsuite: skipIfNoSBHeaders should skip when running remotelyFred Riss2019-11-051-0/+3
| | | | | The LLDB dylib/framework will not be available on the remote host, it makes no sense to try to run those tests in a remote scenario.
* Modernize add-dsym test MakefileFred Riss2019-11-051-17/+7
|
* ValueObject: Upstream early-exit from swift-lldb. (NFC)Adrian Prantl2019-11-051-3/+8
|
* [lldb] Fix Python 3 incompatibility in API/lit.cfg.pyJonas Devlieghere2019-11-051-3/+4
| | | | | This code path is only taken on the sanitized bot, where it caused a TypeError: "Can't mix strings and bytes in path components".
* [lldb] [Python] Build readline override module only on LinuxMichał Górny2019-11-051-1/+1
| | | | | | | | | Restrict building the readline override to Linux only. It both does not build on *BSD systems, and is largely irrelevant since they default to using libedit over readline anyway. This restores the behavior of the old readline override that also was built only on Linux. Differential Revision: https://reviews.llvm.org/D69846
* [lldb] Fix readline/libedit compat patch for py2serge-sans-paille2019-11-051-1/+9
| | | | This is a follow-up to https://reviews.llvm.org/D69793
* lldb/breakpad: add suppport for the "x86_64h" architecturePavel Labath2019-11-052-2/+2
|
* Revert and patch "[Python] Remove readline module"serge-sans-paille2019-11-054-0/+124
| | | | | | | | | | | | | | | | | | | | Fix https://bugs.llvm.org/show_bug.cgi?id=43830 while avoiding polluting the global Python namespace. This both reverts r357277 to rebundle a version of Python's readline module based on libedit. However, this patch also provides two improvements over the previous implementation: 1. use PyMem_RawMalloc instead of PyMem_Malloc, as expected by PyOS_Readline (prevents to segfault upon exit of interactive session) 2. patch the readline module upon embedded interpreter loading, instead of patching it globally, which should prevent any side effect on other modules/packages 3. only activate the patched module if libedit is actually linked in lldb Differential Revision: https://reviews.llvm.org/D69793
* lldb/minidump: Add support for the alternate ARM64 constantPavel Labath2019-11-052-1/+2
|
* MemoryRegion: Print "don't know" permission values as suchPavel Labath2019-11-054-25/+33
| | | | | | | | | | | | | | | | | | | Summary: The permissions in a memory region have ternary states (yes, no, don't know), but the memory region command only prints in binary, treating "don't know" as "yes", which is particularly confusing as for instance the unwinder will treat an unknown value as "no". This patch makes is so that we distinguish all three states when printing the values, using "?" to indicate the lack of information. It is implemented via a special argument to the format provider for the OptionalBool enumeration. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D69106
* [lldb][NFC] Give some parameters in CommandInterpreter more descriptive namesRaphael Isemann2019-11-052-9/+9
|
* [cmake] Add an option to skip stripping before installVedant Kumar2019-11-042-7/+10
| | | | | | The swift build system has support for cross-compiling, installing, and generating symbols for lldb. As the swift symbol-generation step occurs after installation, we need to disable stripping during the install.
* [LLDB][Python] remove ArgInfo::countLawrence D'Anna2019-11-045-88/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch updates the last user of ArgInfo::count and deletes it. I also delete `GetNumInitArguments()` and `GetInitArgInfo()`. Classess are callables and `GetArgInfo()` should work on them. On python 3 it already works, of course. `inspect` is good. On python 2 we have to add yet another special case. But hey if python 2 wasn't crufty we wouln't need python 3. I also delete `is_bound_method` becuase it is unused. This path is tested in `TestStepScripted.py` Reviewers: labath, mgorny, JDevlieghere Reviewed By: labath, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69742
* [lldb] [Process/NetBSD] Add register info for missing register setsMichał Górny2019-11-044-4/+64
| | | | | | | | | | | | | | | | | | | | | | Add info for all register sets supported in NetBSD, particularly for all registers 'expected' by LLDB. This is necessary in order to fix python_api/lldbutil/iter/TestRegistersIterator.py test that currently fails due to missing names of register sets (None). This copies fpreg descriptions from Linux, and combines Linux' AVX and MPX registers into a single XState group, to fit NetBSD register group design. Technically, we do not support MPX registers at the moment but gdb-remote insists on passing their errors anyway, and if we do not include it in any group, they end up in a separate anonymous group that breaks the test. While at it, swap the enums for XState and DBRegs to match register set ordering. This also adds a few consts to the lldb-x86-register-enums.h to provide more consistency between user registers and debug registers. Differential Revision: https://reviews.llvm.org/D69667
* [lldb][NFC] Remove Ocaml from TypeSystem::LLVMCastKindRaphael Isemann2019-11-041-1/+0
| | | | Ocaml support was removed.
* [lldb][NFC] Remove unused ExpressionParser::ParseRaphael Isemann2019-11-043-16/+5
| | | | | | | | | | | | | | | Summary: This function is only used internally by ClangExpressionParser. By putting it in the ExpressionParser class all languages that implement ExpressionParser::Parse have to share the same signature (which forces us in downstream to add swift-specific arguments to ExpressionParser::Parse which then propagate to ClangExpressionParser and so on). Reviewers: davide Subscribers: JDevlieghere, lldb-commits Tags: #upstreaming_lldb_s_downstream_patches, #lldb Differential Revision: https://reviews.llvm.org/D69710
* [lldb][NFC] Make test/python_api/module_section test smallerRaphael Isemann2019-11-041-132/+2
| | | | | | | | | | | | | | | | Summary: I don't see why this test needs to compile this rather complicated file for just testing module sections. This just removes all this code with a simple "Hello world!" program which should be faster to compile Reviewers: labath, davide, JDevlieghere Reviewed By: JDevlieghere Subscribers: jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69705
* [lldb] Also disable de-registration of EHFrames in IRExecutionUnitRaphael Isemann2019-11-041-0/+2
| | | | | | | | | | | | | | | | | Summary: We disabled registration by providing an empty `registerEHFrames`, so we should also provide an empty `deregisterEHFrames` in case that function relies on `registerEHFrames` being called before. Currently `deregisterEHFrames` is a no-op anyway as it just iterates over the (empty( list of registered EHFrames and then clear the empty list. Reviewers: davide, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #upstreaming_lldb_s_downstream_patches, #lldb Differential Revision: https://reviews.llvm.org/D69713
* [lldb] Provide a getter for m_materializer_up in LLVMUserExpression instead ↵Raphael Isemann2019-11-043-2/+8
| | | | | | | | | | | | | | | | | | of relying on it being accessible. Summary: Motivated by Swift using the materializer in a few places which requires us to add this getter ourselves. We also need a setter, but let's keep this minimal to unblock the downstream reverts in Swift. Reviewers: davide Reviewed By: davide Subscribers: abidh, JDevlieghere, lldb-commits Tags: #upstreaming_lldb_s_downstream_patches, #lldb Differential Revision: https://reviews.llvm.org/D69714
* [lldb] Add trailing dots to comments in Value.cppRaphael Isemann2019-11-041-2/+2
| | | | | | | | | | | | Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #upstreaming_lldb_s_downstream_patches, #lldb Differential Revision: https://reviews.llvm.org/D69717
* python path should be platform-dependentLuboš Luňák2019-11-021-1/+1
| | | | | | Because one of the installed files is the _lldb.so symlink. Differential Revision: https://reviews.llvm.org/D68910
* Don't assume that __cxa_current_exception_type exists.Jim Ingham2019-11-011-0/+3
| | | | | | | | | Normally you shouldn't be able to have a process with an ItaniumABI plugin that doesn't have this symbol. But if the loader crashes before loading libc++abi.dylib (on MacOS), then the symbol might not be present. So we should check before accessing the pointer. There isn't a good way to write a test for this, but the change is obvious.
* Reapply [LLDB] [test] Use %clang_cl instead of build.py in a few testsMartin Storsjö2019-11-012-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows explicitly specifying the intended target architecture, for tests that aren't supposed to be executed, and that don't require MSVC headers or libraries to be available. (These tests already implicitly assumed to be built for x86; one didn't specify anything, assuming x86_64, while the other specified --arch=32, which only picks the 32 bit variant of the default target architecture). Join two comment lines in disassembly.cpp, to keep row numbers checked in the test unchanged. This fixes running check-lldb on arm linux. Previously when this was applied (in 95980409e6), it broke macos buildbots, as they added "-isysroot <path>" to all %clang* substitutions, and clang-cl didn't support that. Reapplying it without further changes to this patch, after D69619 (9c73925226), because now, such extra parameters are added to %clang_host*, but not to plain %clang_cl. Differential Revision: https://reviews.llvm.org/D69031
* Fix typeo in CPU_TYPE_ARM64_32 for older SDKs.Jason Molenda2019-10-311-1/+1
|
OpenPOWER on IntegriCloud