summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLDB] Fix a bunch of -Wdocumentation warningsJonas Devlieghere2019-11-137-18/+8
|
* [Reproducer] Discard reproducer directory if not generated.Jonas Devlieghere2019-11-121-3/+5
| | | | | If lldb was run in capture mode, but no reproducer was generated, make sure we clean up the reproducer directory.
* [LLDB] Add core definition for armv8l and armv7lMuhammad Omair Javaid2019-11-131-0/+6
| | | | | | | | | | | | | This patch adds core definitions in lldb ArchSpecs for armv8l and armv7l cores. This was needed because on Linux running on 32-bit Arm v8 we are returned armv8l in case we are running 32-bit sysroot on 64bit kernel. In case of 32-bit kernel and 32-bit sysroot running on arm v8 hardware we are returned armv7l. This is quite common when we run 32 bit arm using docker container. Signed-off-by: Muhammad Omair Javaid <omair.javaid@linaro.org> Differential Revision: https://reviews.llvm.org/D69904
* [LLDB] Only set FRAMEWORK when we're actually building a framework.Jonas Devlieghere2019-11-121-1/+2
|
* [LLDB] Fix/silence CMake developer warning for LLDB framework.Jonas Devlieghere2019-11-121-1/+1
| | | | | | | | | | | | This fixes the following warning for developers: Target 'liblldb' was changed to a FRAMEWORK sometime after install(). This may result in the wrong install DESTINATION. Set the FRAMEWORK property earlier. The solution is to pass the FRAMEWORK flag to add_lldb_library and set the target property before install(). For now liblldb is the only customer.
* [LLDB][Formatters] Re-enable std::function formatter with fixes to improve ↵shafik2019-11-124-78/+154
| | | | | | | | | non-cached lookup performance Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111 This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU. Differential Revision: https://reviews.llvm.org/D69913
* [ObjectFileMachO] Fix the build for __arm64__.Davide Italiano2019-11-121-2/+1
| | | | Catch up with an API change.
* Performance: Add a set of visited SymbolFiles to the other FindFiles variant.Adrian Prantl2019-11-1211-20/+36
| | | | | | | | | | | | | | This is basically the same bug as in r260434. SymbolFileDWARF::FindTypes has exponential worst-case when digging through dependency DAG of .pcm files because each object file and .pcm file may depend on an already-visited .pcm file, which may again have dependencies. Fixed here by carrying a set of already visited SymbolFiles around. rdar://problem/56993424 Differential Revision: https://reviews.llvm.org/D70106
* Revert "Fix lookup of symbols at the same address with no size vs. size"Muhammad Omair Javaid2019-11-121-8/+2
| | | | | | | | This reverts commit 3f594ed1686b44138bee245c708773e526643aaf. This change has cause LLDB expression evaluation to fail on Arm Linux. Differential Revision: https://reviews.llvm.org/D63540
* [lldb] Fix more -Wdeprecated-copy warningsPavel Labath2019-11-123-30/+4
| | | | | | | This warning triggers when a class defines a copy constructor but not a copy-assignment operator (which then gets auto-generated by the compiler). Fix the warning by deleting the other operator too, as the default implementation works just fine.
* [lldb] Fix some warnings in the python pluginPavel Labath2019-11-122-2/+3
|
* [lldb] [Process/NetBSD] Use PT_STOP to stop the process [NFCI]Michał Górny2019-11-122-6/+7
| | | | Differential Revision: https://reviews.llvm.org/D70060
* [lldb][NFC] Simplify a return in ↵Raphael Isemann2019-11-121-1/+1
| | | | | | ThreadPlanStepInRange::DefaultShouldStopHereCallback We know should_stop_here is false here, so we might as well return false directly.
* [lldb] Add missing include to ObjCLanguage.cpp to fix buildRaphael Isemann2019-11-121-0/+1
|
* [lldb][NFC] Move LLVM RTTI implementation from enum to static ID variableRaphael Isemann2019-11-1211-36/+51
| | | | | | | | | | | | | | | | Summary: swift-lldb currently has to patch the ExpressionKind enum to add support for Swift expressions. If we implement LLVM's RTTI with a static ID variable instead of a centralised enum we can drop that patch. Reviewers: labath, davide Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #upstreaming_lldb_s_downstream_patches, #lldb Differential Revision: https://reviews.llvm.org/D70070
* [lldb] Check if we actually have a Clang type in ↵Raphael Isemann2019-11-121-1/+1
| | | | | | | | ObjCLanguage::GetPossibleFormattersMatches We call IsPossibleDynamicType but we also need to check if this is a Clang type, otherwise other languages with dynamic types (like Swift) might end up being interpreted as potential Obj-C dynamic types.
* [Reproducer] Quit the debugger after generating a reproducerJonas Devlieghere2019-11-111-2/+4
| | | | | | | Currently nothing prevents you from continuing your debug session after generating the reproducer. This can cause the reproducer to end up in an inconsistent state. Most of the time this doesn't matter, but I want to prevent this from causing bugs in the future.
* Fix a regression in macOS-style path remapping.Adrian Prantl2019-11-111-19/+21
| | | | | | | | | | | | | | | | When we switched to the LLVM .debug_line parser, the .dSYM-style path remapping logic stopped working for relative paths because of how RemapSourceFile silently fails for relative paths. This patch both makes the code more readable and fixes this particular bug. One interesting thing I learned is that Module::RemapSourceFile() is a macOS-only code path that operates on on the lldb::Module level and is completely separate from target.source-map, which operates on a per-Target level. Differential Revision: https://reviews.llvm.org/D70037 rdar://problem/56924558
* lldb: Fix some -Wdeprecated-copy warningsPavel Labath2019-11-116-60/+0
| | | | | | | | gcc-9 started warning when a class defined a copy constructor without a copy assignment operator (or vice-versa). This fixes those warnings by deleting the other special member too (after verifying it doesn't do anything non-trivial).
* Temporarily change the default for use-g-packet-for-reading to false,Jason Molenda2019-11-081-1/+1
| | | | | | | | until we can automatically fall back to p/P if g/G are not supported; it looks like there is a bug in debugserver's g/G packets taht needs to be fixed, or debugserver should stop supporting g/G until that bug is fixed. But we need lldb to be able to fall back to p/P correctly for that to be a viable workaround.
* Properly propagate is_variadic.Adrian Prantl2019-11-081-1/+1
| | | | | This fixes a copy&paste error made when adapting to new clang API which was promptly caught by the bots.
* Adapt LLDB to clang API change in ObjCMethodDecl::create().Adrian Prantl2019-11-082-15/+24
|
* [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>
* BreakpointDummyOptionGroup was using g_breakpoint_modify_options rather than ↵Jim Ingham2019-11-071-1/+1
| | | | | | | | | | 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.
* [lldb] Comment typo fixJan Kratochvil2019-11-071-1/+1
|
* [lldb] Add -m option to 'target modules dump symtab' to disable demanglingRaphael Isemann2019-11-074-13/+29
| | | | | | | | | | | | | | 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-078-20/+42
| | | | | | | | | | | | 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-062-13/+35
| | | | | | | | | | 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] Remove dead code from STLUtils.hJonas Devlieghere2019-11-065-7/+3
|
* [LLDB] Fix handling for the clang name mangling extension for block invocationsshafik2019-11-063-23/+30
| | | | | | Add support for clangs mangling extension for block invocations. Differential Revision: https://reviews.llvm.org/D69738
* 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]
* [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.
* ValueObject: Upstream early-exit from swift-lldb. (NFC)Adrian Prantl2019-11-051-3/+8
|
* [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-051-1/+1
|
* 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-051-0/+1
|
* MemoryRegion: Print "don't know" permission values as suchPavel Labath2019-11-052-10/+27
| | | | | | | | | | | | | | | | | | | 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-051-6/+6
|
* [LLDB][Python] remove ArgInfo::countLawrence D'Anna2019-11-043-65/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-043-3/+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 unused ExpressionParser::ParseRaphael Isemann2019-11-042-5/+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] Provide a getter for m_materializer_up in LLVMUserExpression instead ↵Raphael Isemann2019-11-041-2/+2
| | | | | | | | | | | | | | | | | | 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
* 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.
OpenPOWER on IntegriCloud