Commit Graph

15312 Commits

Author SHA1 Message Date
Tamas Berghammer 5ac6e91c4f Re-generate the python and cpp reference documentation
They haven't been updated since July 2013 so they missed a lot of new
function added to the SB API since.

Bug: llvm.org/pr30603
llvm-svn: 284725
2016-10-20 13:04:32 +00:00
Omair Javaid 05ac4c445c Fix ARM/AArch64 Step-Over watchpoint issue remove provision for duplicate watchpoints
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
2016-10-20 09:07:26 +00:00
Sean Callanan 7ef7b449a0 Added a decorator for the macOS version and switched over testcases that used platform.release
llvm-svn: 284674
2016-10-20 00:03:39 +00:00
Jason Molenda 0b5102fd7e Add lldb register definitions for w0-w28, s0-s31, and d0-d31 to
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
2016-10-19 23:38:38 +00:00
Pavel Labath 5f05ea84d5 Simplify GetGlobalProperties functions of Thread/Process/Target
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
2016-10-19 15:12:45 +00:00
Pavel Labath 37dabc2427 Remove IntervalTimer class
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
2016-10-19 15:01:22 +00:00
Dimitar Vlahovski b52206decc Minidump plugin: functions parsing memory structures and filtering module list
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
2016-10-19 14:14:18 +00:00
Michal Gorny e2f4b25d04 [cmake] Use LLVM_CMAKE_PATH for GetSVN script
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
2016-10-19 12:54:28 +00:00
Chris Bieneman e0dcd6d7f4 Revert back to the state before r284550
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
2016-10-19 02:44:20 +00:00
Chris Bieneman 716ac7684c Trying to fix a few more missing LDFLAGS.
llvm-svn: 284564
2016-10-19 02:31:31 +00:00
Chris Bieneman 87378bd21e Fixing the linux bots I broke in r284550
Need to gate cxx linker adding driver-mode flag based on the linker being clang.

llvm-svn: 284555
2016-10-19 00:13:56 +00:00
Chris Bieneman b47711ab27 When invoking Terminal, don't assume the default shell
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
2016-10-18 23:55:34 +00:00
Chris Bieneman f50761f128 [CMake] Don't include LLDB_TEST_COMPILER in cached variable
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
2016-10-18 23:54:28 +00:00
Chris Bieneman e80f007dfb Use clang --driver-mode instead of guessing c++ compiler path
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
2016-10-18 23:53:24 +00:00
Todd Fiala af6ff2a91b xfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS
Needs to be investigated.  This is failing locally and on the
Xcode CI.

rdar://28805064

llvm-svn: 284484
2016-10-18 15:15:24 +00:00
Pavel Labath 3318642466 Fixup r284466 - try to unbreak NetBSD
NetBSD does not have getopt as well - we need to apply the workaround there too.
FreeBSD seems to be fine though.

llvm-svn: 284469
2016-10-18 10:46:45 +00:00
Pavel Labath 01a955a341 [cmake] Make dependencies of lldb libraries private, take 2
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
2016-10-18 10:26:57 +00:00
Jim Ingham 8d50e0c26e Remove a debug print statement.
llvm-svn: 284448
2016-10-18 01:52:32 +00:00
Jim Ingham a7d25264eb More testsuite xfail markings cleanup.
llvm-svn: 284446
2016-10-18 01:43:22 +00:00
Jim Ingham 981da8d37b Fix a crash in expressions with fixits in the dummy target.
In the expression command, if the target is NULL, you have to use the dummy
target.

<rdar://problem/28811687>

llvm-svn: 284439
2016-10-17 23:59:41 +00:00
Walter Erquinigo 344546bd6e [lldb] Read modules from memory when a local copy is not available
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
2016-10-17 20:28:19 +00:00
Justin Bogner b69c3169b0 unittests: Specify types in a bunch of unittest EXPECT's
The EXPECT and ASSERT macros in gtest don't do the usual arithmetic
conversions. Specify types in several of them to fix -Werror.

llvm-svn: 284405
2016-10-17 18:22:03 +00:00
Justin Bogner 812101d862 Interpreter: Don't return StringRef from functions whose return value is never used
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
2016-10-17 06:17:56 +00:00
Jim Ingham 4b4e705b67 This test is no longer failing for gmodules.
llvm-svn: 284296
2016-10-15 00:04:38 +00:00
Chris Bieneman 9a6502f1cd [CMake] Populate LLDB.framework's headers directory
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
2016-10-14 17:09:55 +00:00
Vadim Macagon 4b7bb3cc96 [LLDB-MI] Minor cleanup of CMICmnLLDBUtilSBValue class
Summary:
Placeholder c-strings don't need to be instance variables.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D25592

llvm-svn: 284231
2016-10-14 12:58:02 +00:00
Jim Ingham f70847deef This test passes on i386 now.
llvm-svn: 284183
2016-10-14 01:11:19 +00:00
Jim Ingham f5afb8bd80 This test is passing on i386 now.
llvm-svn: 284182
2016-10-14 01:03:03 +00:00
Richard Chamberlain a0c82e18d5 [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
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
2016-10-13 12:11:00 +00:00
Vadim Macagon bdff2dc8d7 Fix Python binding generation build step on Windows
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
2016-10-13 04:07:22 +00:00
Chris Bieneman e549894b7d [CMake] Cleanup check-lldb targets
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
2016-10-12 20:26:13 +00:00
Chris Bieneman 47df0196b8 Use LLDB_SRC for relative paths
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
2016-10-12 20:24:42 +00:00
Chris Bieneman c6667075b3 Fix test suite lookup path for LLDB.h
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
2016-10-12 20:22:02 +00:00
Chris Bieneman 4c63acc39e Fix building tests without system headers on Darwin
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
2016-10-12 20:19:19 +00:00
Chris Bieneman 35e5457e0c Fix lookup path for lldb-mi
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
2016-10-12 20:15:46 +00:00
Nitesh Jain 47a2c55447 [LLDB][MIPS] fix Floating point register read/write for big endian
Reviewers: clayborg, labath, jaydeep

Subscribers: bhushan, slthakur, lldb-commits

Differential Revision: https://reviews.llvm.org/D24603

llvm-svn: 284003
2016-10-12 10:53:57 +00:00
Nitesh Jain 8999edf2f6 [LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI
Reviewers: clayborg, labath

Subscribers: jaydeep, bhushan, slthakur, lldb-commits

Differential Revision: https://reviews.llvm.org/D25021

llvm-svn: 284001
2016-10-12 10:21:09 +00:00
Jason Molenda c4be4be5dd Add an arm64 unit test where the function saves x20 in the
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
2016-10-12 03:53:01 +00:00
Jason Molenda 075605c8d4 Add a simple frameless function test case to the arm64 unwind unit tests
with return statements in the body of the function.

llvm-svn: 283966
2016-10-12 02:46:22 +00:00
Jim Ingham 569bc27843 This test now passes.
llvm-svn: 283959
2016-10-12 00:05:36 +00:00
Jim Ingham 5afd6f7b2e This was skipped due to a clang PR that has been fixed.
llvm-svn: 283957
2016-10-11 23:55:13 +00:00
Jim Ingham 6aa9d1d756 Added a radar on our end for this test's failure.
llvm-svn: 283956
2016-10-11 23:30:38 +00:00
Jim Ingham 7d84aff200 Add the radar number on our end.
llvm-svn: 283940
2016-10-11 21:08:27 +00:00
Jim Ingham 2aa6ef7567 This test now passes.
llvm-svn: 283929
2016-10-11 20:09:40 +00:00
Jim Ingham e8be3ad9b2 Added a bugreport tracking the failure to get float return values
on i386.

llvm-svn: 283923
2016-10-11 19:29:25 +00:00
Sean Callanan 0354a6888f Clarified the explanation of expr --top-level.
llvm-svn: 283904
2016-10-11 16:57:21 +00:00
Pavel Labath 628c5377b0 Fix Arm64InstEmulation tests for windows
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
2016-10-11 11:05:34 +00:00
Jason Molenda 086a78cf23 Add a second, more complicated, arm64 example program to
the arm64 assembly unwind tests.

llvm-svn: 283849
2016-10-11 03:44:48 +00:00
Jason Molenda 6853cca1c9 Add a first unit test for the arm64 instruction profiled unwind
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
2016-10-11 02:24:00 +00:00
Jim Ingham 8e7fe2c741 Fixing the bug number for darwin on this failure.
llvm-svn: 283843
2016-10-11 01:53:43 +00:00