Commit Graph

15617 Commits

Author SHA1 Message Date
Sean Callanan 756cb33b6a specify -DNDEBUG for BNI builds of all targets in the Xcode build
llvm-svn: 290282
2016-12-21 23:21:11 +00:00
Chris Bieneman e9ce09b89f [CMake] Support distribution install for LLDB.framework
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
2016-12-21 21:23:27 +00:00
Jim Ingham df1e4b697e Ignore SIGPIPE in the mini-driver used by these tests.
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
2016-12-21 00:12:54 +00:00
Boris Ulasevich 9cc1e19603 Rollback my commit r290168 to fix linux tests failure. I'll be back!
llvm-svn: 290197
2016-12-20 20:00:58 +00:00
Chris Bieneman 11da40b775 [CMake] [PR31433] Fix LLDB tool installation
This resolves PR 31433.

llvm-svn: 290180
2016-12-20 16:28:18 +00:00
Boris Ulasevich 881989cb69 Bug 30863 - Step doesn't stop with coditional breakpoint on the next line
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
2016-12-20 08:09:50 +00:00
Jason Molenda 97c96cb4ed Change the timeout in CallBoardSystemServiceOpenApplication to
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
2016-12-20 04:54:04 +00:00
Luke Drummond f5bb1d6c4e Expression evaluation for overloaded C functions (redux)
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
2016-12-19 17:22:44 +00:00
Sylvestre Ledru 521d7b45ba Fix the cmake declaration syntax
llvm-svn: 290045
2016-12-17 13:04:35 +00:00
Sylvestre Ledru 47b071deff Support of lldb on Kfreebsd
Summary: Patch by Pino Toscano. Reported in http://bugs.debian.org/835665

Reviewers: tfiala, emaste

Subscribers: beanz, mgorny, emaste, krytarowski, brucem, tberghammer, danalbert, srhines, #lldb

Tags: #lldb

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

llvm-svn: 290044
2016-12-17 12:48:06 +00:00
Zachary Turner 91ad7a9b69 Fix compiler warning.
llvm-svn: 289994
2016-12-16 21:35:12 +00:00
Luke Drummond c3d0165c49 Fix broken escaping of commands in the build
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
2016-12-16 16:38:25 +00:00
Hafiz Abid Qadeer 95cc3456e8 Remove an unused type declaration.
llvm-svn: 289947
2016-12-16 14:44:34 +00:00
Zachary Turner 827d5d74a5 Add methods to enable using formatv syntax in LLDB.
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
2016-12-16 04:27:00 +00:00
Jason Molenda 3826727453 Fix a bug when using a StructuredData darwin-log plugin
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
2016-12-16 02:48:39 +00:00
Chris Bieneman d69b9414b3 [CMake] Refactor LLDB libraries and tools to be components
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
2016-12-15 22:01:17 +00:00
Chris Bieneman 1662da2832 [CMake] Ensure Python files are inside the LLDB framework bundle
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
2016-12-15 18:19:10 +00:00
Chris Bieneman 679d02f2a1 [CMake] Only support LLDB_BUILD_FRAMEWORK on CMake 3.7 and later
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
2016-12-15 18:18:47 +00:00
Hafiz Abid Qadeer f6ee79c926 Fix build for mingw.
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
2016-12-15 15:00:41 +00:00
Pavel Labath 1f2c1b6ccd Remove linux/personality.h wrapper
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
2016-12-15 10:47:40 +00:00
Jim Ingham 8f7db52d9d Fix incorrectly named variables.
llvm-svn: 289746
2016-12-15 00:30:30 +00:00
Sean Callanan 237c3ed95e Adopt PrettyStackTrace in LLDB
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
2016-12-14 21:31:31 +00:00
Jim Ingham 09558cb8a4 Test num locations >= 1 not == 1.
llvm-svn: 289695
2016-12-14 19:35:56 +00:00
Stephan Bergmann 17c7f70362 Replace APFloatBase static fltSemantics data members with getter functions
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
2016-12-14 11:57:17 +00:00
Hafiz Abid Qadeer e00b96ecbd Remove code needed for supporting old VS versions.
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
2016-12-14 11:13:03 +00:00
Jason Molenda 6546b9a209 Small tweaks to the markup in StructuredDataPlugins.
llvm-svn: 289520
2016-12-13 05:59:24 +00:00
Jason Molenda 30011bf4a8 Touch-up the markup of the DarwinLog.md documentation.
llvm-svn: 289518
2016-12-13 05:54:17 +00:00
Todd Fiala 4e62292b11 Removing myself from code ownership file
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
2016-12-12 22:42:00 +00:00
Pavel Labath d2396b6425 Remove some annotations from TestMultipleTargets
The test passes on linux. The i386 case is already handled by
skipIfHostIncompatibleWithRemote.

llvm-svn: 289427
2016-12-12 11:37:42 +00:00
Greg Clayton 8f61811789 Fix i386 being able to show member variables correctly by not returning empty objective C types from the runtime.
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
2016-12-09 17:54:59 +00:00
Greg Clayton 461ba656a5 Fix buildbots that are failing due to this test by adding all expected fails that TestMultipleDebuggers.py has.
llvm-svn: 289223
2016-12-09 16:25:13 +00:00
Greg Clayton 1c4d4d61cb Rename multiple target test so it is unique.
llvm-svn: 289222
2016-12-09 16:22:10 +00:00
Nitesh Jain 0546e845c0 [LLDB][MIPS] Fix TestWatchpointIter failure
Reviewers: jingham

Subscribers: jaydeep, bhushan, slthakur, lldb-commits

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

llvm-svn: 289211
2016-12-09 13:54:47 +00:00
Nitesh Jain e51a967d89 [LLDB][MIPS] Fix TestMultipleHits for MIPS
Reviewers: clayborg, labath, zturner

Subscribers: jaydeep, bhushan, slthakur, lldb-commits

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

llvm-svn: 289210
2016-12-09 13:44:15 +00:00
Nitesh Jain de5923a70a [LLDB][MIPS] Fix some test case failures due to elf_abi field of qprocessInfo packet.
Reviewers: jaydeep, bhushan, clayborg

Subscribers: slthakur, lldb-commits

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

llvm-svn: 289209
2016-12-09 13:37:14 +00:00
Pavel Labath 73ee5c2fc4 Fix TestMultipleTargets for on x86_64 architectures
This test links against liblldb, so it can only run when the target arch is the
same arch as liblldb. We already have a decorator for that, so apply it.

While I'm in there, also mark the test as debug-info independent.

llvm-svn: 289199
2016-12-09 10:05:07 +00:00
Zachary Turner 2c84f908af Remove some more uses of Args::GetArgumentAtIndex.
llvm-svn: 289188
2016-12-09 05:46:41 +00:00
Greg Clayton 7904046c33 Calling SBDebugger::CeeateTarget being called on multiple threads was crashing LLDB.
I found the race condition in:

ScriptInterpreter *CommandInterpreter::GetScriptInterpreter(bool can_create);

More than one "ScriptInterpreter *" was being returned due to the race which caused any clients with the first one to now be pointing to freed memory and we would quickly crash.

Added a test to catch this so we don't regress.

<rdar://problem/28356584> 

llvm-svn: 289169
2016-12-09 01:21:14 +00:00
Zachary Turner 867e7d1765 Fix some occurrences of passing StringRef to Printf.
Hopefully these will all disappear in the future once we move
to formatv.

llvm-svn: 289168
2016-12-09 01:20:58 +00:00
Zachary Turner 14f6b2c035 Modernize the Args access pattern in a few more commands.
llvm-svn: 289164
2016-12-09 01:08:29 +00:00
Jason Molenda 74e8de063e Clean up the new TestInterruptThreadNames test a bit.
llvm-svn: 289155
2016-12-08 23:34:56 +00:00
Greg Clayton b5cd6e7b7e Fixed a crasher that has been borking out heap for a long time.
ThreadList had an assignment operator that didn't lock the "rhs" thread list object. This means a thread list can be mutated while it is being copied.

The copy constructor calls the assignment operator as well. So this fixes the unsafe threaded access to ThreadList which we believe is responsible for a lot of crashes.

<rdar://problem/28075793>

llvm-svn: 289100
2016-12-08 20:38:19 +00:00
Jason Molenda b3a3cd1f4e When we interrupt a process, it was possible or the thread names
to not be set by Process::WillPublicStop() so the driver won't get
access to them.  The fix is straightforward, moving the call to
WillPublicStop above the early return for the interrupt case.  (the
interrupt case does an early return because the rest of the function
is concerned with running stop hooks etc and those are not applicable
when we've interrupted the process).

Also added a test case for it.  The test case is a little complicated
because I needed to drive lldb asynchronously to give the program
a chance to get up and running before I interrupt it.  Running to
a breakpoint was not sufficient to catch this bug.

<rdar://problem/22693778> 

llvm-svn: 289026
2016-12-08 06:27:29 +00:00
Jason Molenda b2979d8464 Increase timeout for Frontboard app launch request from 9 to 20 seconds
to match other timeouts.

llvm-svn: 289023
2016-12-08 05:12:45 +00:00
Jason Molenda 49034417da Set the address size based on the target's arch instead
of using the address of the all_image_infos struct.
<rdar://problem/29547847> 

llvm-svn: 289016
2016-12-08 02:02:45 +00:00
Zachary Turner f965cc8632 Convert CommandObjectFrame to entry-based Args access.
In the process, discovered a bug related to the use of an
uninitialized-pointer, and fixed as suggested by Enrico
in an lldb-dev mailing list thread.

llvm-svn: 289015
2016-12-08 02:02:09 +00:00
Zachary Turner 4574a89051 Convert CommandObjectCommands to entry-based Args access.
llvm-svn: 289012
2016-12-08 01:31:04 +00:00
Zachary Turner 7fb5e3434b Work around a bogus warning on MSVC.
llvm-svn: 289009
2016-12-08 00:54:24 +00:00
Greg Clayton e04e5b954a Improve crashlog.py so it can handle more iOS crashlog files.
<rdar://problem/29191857>

llvm-svn: 289006
2016-12-08 00:22:45 +00:00
Greg Clayton 962364c605 Fix an unannotated fallthrough that was causing a warning.
llvm-svn: 289000
2016-12-07 23:52:27 +00:00