Summary:
Some of the mi commands implemented in lldb-mi are incomplete/not confirming to the spec.
- `gdb-show` and `gdb-set` doesn't support getting/setting `disassembly-flavor`
- `environment-cd` should also change the working directory for inferior
- debugger CLI output should be printed as console-stream-output record, rather than being dumped directly
to stdout
- `target-select` should provide inner error message in mi response
Related bug report:
- https://llvm.org/bugs/show_bug.cgi?id=28026
- https://llvm.org/bugs/show_bug.cgi?id=28718
- https://llvm.org/bugs/show_bug.cgi?id=30265
Reviewers: ki.stfu, abidh
Subscribers: abidh, ki.stfu, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D24711
llvm-svn: 291104
Added an extra field parser to the `RSModuleDescriptor` class enabling us to
check whether the versions of LLVM used to generated the debug symbols match
across the RenderScript compiler frontend (llvm-rs-cc) and backend (bcc); if
they do not, we warn the user that the debugging experience may be suboptimal
as LLVM IR debug information has no compatibility guarantees.
llvm-svn: 290957
lldb-gtest binary that xcode builds for -scheme lldb-gtest; these tests
won't run on macosx systems. Fixes testsuite failures we started
seeing after 290819.
<rdar://problem/29853778>
llvm-svn: 290917
Previously it parsed /proc/<pid>/maps for every module separately
resulting in a very slow response time. This CL add some caching and
optimizes the implementation to improve the code from O(n*m) to O(n+m)
where n is the number of modules requested and m is the number of
files mapped into memory.
Differential revision: https://reviews.llvm.org/D28233
llvm-svn: 290895
r290874 enabled the s390x test, which caused the rest of the tests to start
misbehaving. This is because this test switches the selected platform and the
change persists.
This fixes it by explicitly resetting the platform in a similar way to the gcore
tests do. Potentially we should consider re-setting the platform globally
between each test run to better protect tests from each other.
llvm-svn: 290890
Summary:
This patch changes and simplifies the way notes are read from Linux Elf cores.
The current implementation copies the bytes from the notes directly over the lldb structure for 64 bit cores and reads field by field for 32 bit cores. Reading the bytes directly only works if the endianess of the core dump and the platform that lldb are running on matches. The case statements for s390x and x86_64 would would only work on big endian systems and little endian systems respectively. That meant that x86_64 generally worked but s390x didn't unless you were on s390x or another big endian platform.
This patch just reads field by field on all platform and updates the field by field version to allow for those fields which are word size instead of fixed size. It should also slightly simplify adding support for a new Linux platform.
This patch also re-enables the s390x test case in TestLinuxCore.py on all non-s390x platforms as it now passes.
Reviewers: uweigand, clayborg
Differential Revision: https://reviews.llvm.org/D27571
llvm-svn: 290874
Split the PDB tests into DWARF test and actual PDB tests, the latter
requiring DIA SDK. Use the new LLVMConfig.cmake LLVM_ENABLE_DIA_SDK
symbol to enable the PDB tests rather than relying on
llvm/Config/config.h private include file that is not available when
building standalone.
Differential Revision: https://reviews.llvm.org/D26249
llvm-svn: 290819
This patch fixes use of incorrect `%zi` to format a plain `int`, and using
`%llu` to format a `uint64_t`. The fix is to use the new typesafe
`llvm::Formatv` based API.
Differential Revision: https://reviews.llvm.org/D28028
Subscribers: lldb-commits
llvm-svn: 290359
This patch adds the last bit of support to get LLVM_DISTRIBUTION_COMPONENTS working with libLLDB when built as a framework.
This patch adds dummy install targets for binaries built into the framework's Resources directory, and makes the framework's install target depend on all the binaries that get installed with the framework.
llvm-svn: 290273
We're seeing some very occasional failures in these tests where the
mini-driver dies with a SIGPIPE. We don't use SIGPIPE for anything, and
the main lldb driver program already ignores SIGPIPE, so ignoring it in
the mini-driver is a good way to remove these spurious failures.
<rdar://problem/29740488>
llvm-svn: 290216
Fixed by additional completed plans detection, and applying them on breakpoint condition fail.
Thread::GetStopInfo reworked. New test added.
Review https://reviews.llvm.org/D26497
Many thanks to Jim
llvm-svn: 290168
30 seconds to match the old springboard timeout; the launcher
should time out before that and we will hopefully get back
an informative error message instead of timing out ourselves.
llvm-svn: 290163
This is a redux of [Ewan's patch](https://reviews.llvm.org/D17957) , refactored
to properly substitute primitive types using a hook in the itanium demangler,
and updated after the previous patch went stale
The new `SubsPrimitiveParmItanium` function takes a symbol name and replacement
primitive type parameter as before but parses it using the FastDemangler, which
has been modified to be able to notify clients of parse events (primitive types
at this point).
Additionally, we now use a `set` of `ConstStrings` instead of a `vector` so
that we don't try and resolve the same invalid candidate multiple times.
Differential Revision: https://reviews.llvm.org/D27223
Subscribers: lldb-commits
llvm-svn: 290117
A combination of broken escaping in CMake and in the python swig
generation scripts meant that the swig generation step would fail
whenever there were spaces or special characters in parameters passed to
swig.
The fix for this in CMakeLists is to use the VERBATIM option on all
COMMAND-based custom builders relying on CMake to properly escape each
argument in the generated file.
Within the python swig scripts, the fix is to call subprocess.Popen with
a list of raw argument strings rather than ones that are incorrectly
manually escaped, then passed to a shell subprocess via
subprocess.Popen(' '.join(params)). This also prevents nasty things
happening such as accidental command-injection.
This allows us to have the swig / python executables in paths containing
special chars and spaces, (or on shared storage on Win32, e.g
\\some\path or C:\Program Files\swig\swig.exe).
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D26757
llvm-svn: 289956
This adds formatv-backed formatting functions in various
places in LLDB such as StreamString, logging, constructing
error messages, etc. A couple of callsites are changed
from Printf style syntax to formatv style syntax to
illustrate its usage. Additionally, a FileSpec formatter
is introduced so that FileSpecs can be formatted natively.
Differential Revision: https://reviews.llvm.org/D27632
llvm-svn: 289922
where we would insert a breakpoint into a system library
but never remove it, so the second time we ran the binary
there would be two breakpoints and the debugger would
stop there.
<rdar://problem/29654974>
llvm-svn: 289913
In LLVM's CMake we have a convention that components have both a build and an install target. Making LLDB follow this convention will allow LLDB to take advantage of the LLVM_DISTRIBUTION_COMPONENTS build option from LLVM.
llvm-svn: 289879
When building the LLDB Framework we need to ensure that the Python files get put into the Framework before the Framework's install target can be invoked.
All files inside the Framework's Resources bundle will get copied over during the install action.
llvm-svn: 289842
CMake's framework target generation was unable to generate POST_BUILD steps (see: https://gitlab.kitware.com/cmake/cmake/issues/16363).
It turns out working around this is really not reasonable. The more reasonable solution to me is just to not support LLDB.framework unless you are on CMake 3.7 or newer.
Since CMake 3.7.1 is released that's how I'm going to handle this.
llvm-svn: 289841
Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there.
Reviewers: zturner, labath, abidh
Subscribers: ki.stfu, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D27759
llvm-svn: 289821
This code is currently unused.
Removing it should make porting of the linux plugin to NetBSD easier, and we can
always add it later if needed.
llvm-svn: 289801
LLDB needs some minor changes to adopt PrettyStackTrace after https://reviews.llvm.org/D27683.
We remove our own SetCrashDescription() function and use LLVM-provided RAII objects instead.
We also make sure LLDB doesn't define __crashtracer_info__ which would collide with LLVM's definition.
Differential Revision: https://reviews.llvm.org/D27735
llvm-svn: 289711
At least the plugin used by the LibreOffice build
(<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly
uses those members (through inline functions in LLVM/Clang include files in turn
using them), but they are not exported by utils/extract_symbols.py on Windows,
and accessing data across DLL/EXE boundaries on Windows is generally
problematic.
Differential Revision: https://reviews.llvm.org/D26671
llvm-svn: 289647
Summary: This code was probably needed to support VS2013 and is not needed now. I have built it with VS and mingw. Ok to remove it?
Reviewers: zturner, abidh
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D27707
llvm-svn: 289644
I'm transitioning away from my current employer, and I do not foresee myself
spending much time on LLDB in the near future. Ideally somebody on the Google
Android team takes over the gdb-remote protocol tests, and somebody with decent
familiarity with the test suite infrastructure takes over the parallel test
runner and test event stream portions of the Python test suite.
llvm-svn: 289479
We don't parse ObjC v1 types from the runtime metadata like we do for ObjC v2, but doing so by creating empty types was ruining the i386 v1 debugging experience.
<rdar://problem/24093343>
llvm-svn: 289233