This patch fixes ARM/AArch64 watchpoint bug which was taking inferior out of control while stepping over watchpoints.
Also adds a test case that tests above problem.
Differential revision: https://reviews.llvm.org/D25057
llvm-svn: 284706
RegisterInfos_arm64.h. These register definitions include the
offset into the register context, which will vary depending on the
endianness of the arm64 target system (e.g. s8 is at offset 0 in
v8 on little-endian, it is at offset 12 on big-endian) and I've
only added the little-endian definitions to the table. If we want
to add a big-endian arm64 target, we'll need a separate table which
uses the big-endian offsets for these registers. I changed the
name of the register table from g_register_infos_arm64 to
g_register_infos_arm64_le to make it explicit that this is the
little-endian version of that table, and updated users of the table
to use the new name.
I added support for the "w", "s", and "d" registers to
RegisterContextDarwin_arm64 but it was more an example than anything
useful -- this plugin is only used when working with core files and
darwin core files do not (today) include the floating point register
context, so it only added the support for the "w" pseudo registers.
When we're connected to a real arm64 device, we use the ProcessGDBRemote
code.
llvm-svn: 284666
Summary:
"Initialization of function-local statics is guaranteed to occur only once even when called from
multiple threads, and may be more efficient than the equivalent code using std::call_once."
<http://en.cppreference.com/w/cpp/thread/call_once>
I'd add that it's also more readable.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17710
llvm-svn: 284601
Summary:
it was added back in 2013, but there are no uses of it. I started refactoring
it, but then it occured to me it would better to delete it.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25393
llvm-svn: 284599
Summary:
Now the Minidump parser can parse the:
1) MemoryInfoList - containing region info about memory ranges (readable,
writable, executable)
2) Memory64List - this is the stuct used when the Minidump is a
full-memory one.
3) Adding filtering of the module list (shared libraries list) - there
can be mutliple records in the module list under the same name but with
different load address (e.g. when the binary has non contigious
sections). FilterModuleList eliminates the duplicated modules, leaving
the one with the lowest load addr.
Added unit tests for everything.
Reviewers: labath, zturner
Subscribers: beanz, mgorny, modocache, lldb-commits, amccarth
Differential Revision: https://reviews.llvm.org/D25569
llvm-svn: 284593
Use the LLVM_CMAKE_PATH variable to locate the GetSVN.cmake script.
The variable was already available in stand-alone builds, and is also
set by LLVM since r284581.
llvm-svn: 284584
This patch is causing a lot of issues on bots that I didn't see in local testing. I'm going to have to work on this. Reverting for now while I sort it out.
llvm-svn: 284565
Summary:
If a user has their shell set to a non-POSIX conferment shell the TestTerminal.py tests fail because the shell blurb constructed here may not work in their shell.
In my specific case fish-shell (The Friendly Interactive Shell - http://fishshell.com) does not support $?, it instead uses $status (because it is friendly).
This patch removes the assumption of your default shell by running the constructed bash command via "/bin/bash -c ...". This should be safer for users mutating their shell environment.
Reviewers: tfiala
Subscribers: joerg, lldb-commits
Differential Revision: https://reviews.llvm.org/D25750
llvm-svn: 284552
Summary:
CMake has no builtin mechanism for cache invalidation. As a general convention you want to not expand user-specified variables in other cached variables because they will not get updated when the user changes their specified value.
This patch moves the "-C" option for dotest.py into the LLDB_TEST_COMMON_ARGS and out of the CMake cache. In order to prevent issues with out-of-date cache files on builders I've added code to scrub "-C ${LLDB_TEST_COMPILER}" out of the CMake caches, by Force writing the variable. This code can be removed in a few days once the change has trickled through CI systems.
Reviewers: tfiala, labath, zturner
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D25751
llvm-svn: 284551
Summary:
When building the LLDB test programs, if your CC is clang it actually isn't safe to make CXX a string replace of "clang -> clang++". This falls down on unix configurations if your compiler is clang-${version}.
A safer approach is to use the "--driver-mode=g++" option to tell clang to act like clang++.
Reviewers: tfiala, zturner, labath
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25753
llvm-svn: 284550
Summary:
The dependencies of our libraries (only liblldb, really) we marked as public, which caused all
their dependencies to be repeated when linking any executables to them. This is a problem because
then all the .a files could end up being linked twice, once to liblldb and once
again to to the executable linking against liblldb (lldb, lldb-mi). As it turns out,
our build actually depends on this behavior:
- on windows, lldb does not have getopt, so it pulls it from inside liblldb, even
though getopt is not a part of the exported interface of liblldb (maybe some of
the bsd variants have this problem as well)
- lldb-mi uses llvm, which again is not exported by liblldb
This change does not actually fix these problems (that is going to be a hard
one), but it does make them explicit by moving this magic from add_lldb_library
to the places the executable targets are defined. That way, I can link the
additional .a files only on targets that really need it, and the other targets
can build cleanly and make sure we don't regress further. It also fixes the
LLVM_LINK_LLVM_DYLIB build on linux.
Reviewers: zturner, beanz
Subscribers: ki.stfu, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D25680
llvm-svn: 284466
Summary:
When the local lldb doesn't have access to a copy of the modules in the target, e.g. winphone, with this change now we read these modules from memory.
There are mainly 2 changes:
1. create pecoff object files from memory
2. read from memory when the local file is not available
Reviewers: sas, fjricci, zturner
Subscribers: #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D24284
llvm-svn: 284422
StringRef is passed through all of these APIs but never actually
used. Just remove it from the API for now and if people want to use it
they can add it back.
llvm-svn: 284362
Summary:
This patch adds support for installing public headers in LLDB.framework, and symlinking the headers into the build directory.
While writing the patch I discovered a bug in CMake that prevents applying POST_BUILD steps to framework targets (https://gitlab.kitware.com/cmake/cmake/issues/16363).
I've implemented the support using POST_BUILD steps wrapped under a CMake version check with a TODO so that we can track the fix.
Reviewers: tfiala, zturner, spyffe
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D25570
llvm-svn: 284250
Summary:
ObjectFileELF::RefineModuleDetailsFromNote() identifies Linux core dumps by searching for
library paths starting with /lib/x86_64-linux-gnu or /lib/i386-linux-gnu. This change widens the
test to allow for linux installations which have addition directories in the path.
Reviewers: ted, hhellyer, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25179
llvm-svn: 284114
Summary:
If Python is installed to a location that contains spaces
(e.g. "C:\Program Files\Python3") then the build fails while attempting
to run the modify-python-lldb.py script because the path to the Python
executable is not double-quoted before being passed to the shell. The
fix consists of letting Python handle the formatting of the command
line, since subprocess.Popen() is perfectly capable of handling paths
containing spaces if it's given the command and arguments as a list
instead of a single pre-formatted string.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25396
llvm-svn: 284100
Summary:
This patch adds the following fixes to the check-lldb targets:
* Adds missing dependencies on lldb tools so they get built before tests execute
* Adds Ninja USES_TERMINAL to the target so that the output streams to stdout as it executes
* Uses a generator expression to find the lldb executable, this is more robust than constructing the path manually
Reviewers: tfiala, zturner
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D25490
llvm-svn: 284046
Summary:
Going from LLDB_SRC instead of the file path is safer when looking for compiler-rt. Also need to add support for looking inside the LLVM runtimes subdirectory.
Eventually we should just get CMake to provide these paths during configuration.
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25489
llvm-svn: 284045
Summary:
When running on Darwin, the test suite assumes a specific directory structure for the build directory. This works for the Xcode project builds, but fails for CMake builds regardless of whether or not you are generating the LLDB framework.
This patch allows the Darwin code path to fall back to the more generic code path used by other platforms in the event that LLDB.h isn't where the test suite expects it.
This allows API tests to run on Darwin when building with CMake with the framework build enabled or disabled.
Reviewers: tfiala, zturner
Subscribers: labath, lldb-commits
Differential Revision: https://reviews.llvm.org/D25488
llvm-svn: 284043
Summary: Default installations of OS X do not have system headers installed at /usr/include. This patch allows the LLDB test executables to properly compile when built on a system without headers at /usr/include by specifying a default value for the apple-sdk flag as "macosx".
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25487
llvm-svn: 284042
Summary:
The test suite calls realpath on the lldb executable then append "-mi" to it to find the path of the lldb-mi executable. This does not work when using CMake builds on *nix platforms. On *nix platforms when a version number is set on executables CMake generates the binary as ${name}-${version} with a symlink named ${name} pointing to it.
This results in the lldb executable being named lldb-4.0.0, and since lldb-4.0.0-mi doesn't ever match the lldb-mi executable these tests are always disabled.
This patch looks for lldb-mi in the same directory as lldb.
Reviewers: zturner, tfiala
Subscribers: ki.stfu, enlight, lldb-commits
Differential Revision: https://reviews.llvm.org/D25486
llvm-svn: 284041
prologue, then loads & stores x20 on the stack from a different
location in the middle of the function, and then restores the
reg in the epilogue. The saving/restoring of x20 in the middle
of the function should be ignored.
llvm-svn: 283969
MSVC does not like the declaration of a terminate() function (I guess it looks
too much like std::terminate()). While I'm there, move the setup/teardown code
into the functions gtest provides for that purpose.
llvm-svn: 283870
plan generator.
Fix a small bug in EmulateInstructionARM64::GetFramePointerRegister
which was returning the stack pointer reg instead of fp, prevented
the unwinder from recognizing the switch to using the fp in a
function. (<rdar://problem/28663117>)
Add a new eContextRestoreStackPointer context hint so that the arm64
emulator can flag when the frame pointer value is copied back in to
the stack pointer and that should be used to compute the canonical
frame address again in an epilogue sequence. (<rdar://problem/28704862>)
Small changes to UnwindAssemblyInstEmulation to have a method we can
call without a live process/thread/etc for unit tests.
<rdar://problem/28663117>
<rdar://problem/28704862>
<rdar://problem/28509178>
llvm-svn: 283847