Commit Graph

16376 Commits

Author SHA1 Message Date
Tamas Berghammer b3ad17fbf7 XFAIL/XFlakey some tests what become very flakey on the Linux buildbot
llvm-svn: 309265
2017-07-27 12:01:32 +00:00
Nitesh Jain d055b8f808 [LLDB][MIPS] Fix emulation of Instruction for MIPS64R6 target.
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 309250
2017-07-27 05:34:33 +00:00
Jim Ingham a81bd7f101 Fix the formatting for help on option value types.
Patch by Jessica Han <jessicah@juniper.net>

https://reviews.llvm.org/D35525

llvm-svn: 309238
2017-07-27 00:18:18 +00:00
Sean Callanan 3c023abe55 Skip test_unique_stacks on Darwin, because it doesn't terminate reliably.
rdar://problem/33462362

llvm-svn: 309046
2017-07-25 22:44:34 +00:00
Chris Bieneman 09736e314c [CMake] Build debugserver & debugserver_nonui
When building for iOS we build two variants of debugserver. One which supports UI functionality like Springboard for launching applications, and one which does not.

This patch adds support for building debugserver with and without UI support libraries being available.

llvm-svn: 309026
2017-07-25 20:31:53 +00:00
Chris Bieneman 3769777f11 [CMake] Update Framework construction for iOS
On iOS frameworks don't have versions or resources, they are flatter bundles. This updates the LLDB framework build to accommodate the flatter bundles.

llvm-svn: 309025
2017-07-25 20:31:15 +00:00
Chris Bieneman 7f47b85c52 [CMake] Rework construction of framework bundle
This adds an explicit step for processing the headers and restructures how the framework bundles are constructed. This should make the frameworks more reliably constructed.

llvm-svn: 309024
2017-07-25 20:30:58 +00:00
Chris Bieneman 4a1db1b037 [CMake] Fix framework build
The LLDB framework build looks for the swig-generated source in the wrong place. This should resolve that.

llvm-svn: 309023
2017-07-25 20:30:35 +00:00
Chris Bieneman 5493c34c85 [CMake] NFC. Cleanup unnecessary CMake policy
This is just setting to the default behavior, so it does nothing.

llvm-svn: 309022
2017-07-25 20:30:18 +00:00
Chris Bieneman 5deeda88a3 [CMake] Cleanup unnecessary definition
This is only used in one file, and we already set it correctly on that file, so we don't need to set this everywhere.

llvm-svn: 309021
2017-07-25 20:29:45 +00:00
Chris Bieneman 712fe007cd [CMake] Add debugserver entitlements
When consigning debugserver we should also include the entitlements file on the code sign command.

llvm-svn: 309020
2017-07-25 20:29:28 +00:00
Adrian Prantl 4b2113036d Improve the fix for PR33875 by not hardcoding the section name.
This is a follow-up to r308905.

llvm-svn: 309019
2017-07-25 20:12:25 +00:00
Sean Callanan afc70ab3e2 [TypeSystem] Guard the global `ASTSourceMap` with a mutex
s_source_map in ClangExternalASTSourceCommon.cpp is unguarded 
and therefore can break in multithreaded conditions. This can 
cause crashes in particular if multiple targets are being set
up at once.

This patch wraps s_source_map in a function that ensures 
exclusivity, and makes every user of it use that function
instead.

<rdar://problem/33429774> lldb crashes after "resume_off"

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

llvm-svn: 308993
2017-07-25 17:33:37 +00:00
Eugene Zemtsov 7cff7d4664 Extend 'target symbols add' to load symbols from a given module
Now -shlib flag can be provided alongside with names of symbols files:

(lldb) target symbols add --shlib stripper-lib.so unstripper-lib.so

This is helpful when default matching mechanisms by name and UUID
can't find a module, and the user needs to explicitly specify
which module the given symbol file belongs to.

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

llvm-svn: 308933
2017-07-24 22:52:39 +00:00
Sean Callanan 206c973b1b Skip test_lldbmi_var_update on Darwin.
llvm-svn: 308919
2017-07-24 20:11:20 +00:00
Greg Clayton ea5df1049b Don't allow .debug_types to be parsed as LLDB can crash when enums are not able to be found.
Differential Revision: https://reviews.llvm.org/D35734

llvm-svn: 308911
2017-07-24 18:40:33 +00:00
Adrian Prantl 8bbb130793 RFix PR33875 by distinguishing between DWO and clang modules.
This reapplies https://reviews.llvm.org/D35740 with a tweak to find
the section by name rather than type. Section types don't distinguish
between regular sections and their DWO counterparts.

llvm-svn: 308905
2017-07-24 18:06:39 +00:00
Greg Clayton 2434d45b85 Don't crash when hostname is empty. StringRef will assert and kill your program.
llvm-svn: 308896
2017-07-24 16:47:04 +00:00
Adrian Prantl ed6f69c111 Revert "Fix PR33875 by distinguishing between DWO and clang modules"
This reverts commit r308850.

llvm-svn: 308851
2017-07-23 20:24:41 +00:00
Adrian Prantl 651166c2d2 Fix PR33875 by distinguishing between DWO and clang modules
The DWO handling code can get confused by clang modules which also use
skeleton CUs to point to the object file with the full debug
info. This patch detects whether an object is a "real" DWO or a clang
module and prevents LLDB from interpreting clang modules as DWO. This
fixes the regression in TestWithModuleDebugging.

http://llvm.org/bugs/show_bug.cgi?id=33875

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

llvm-svn: 308850
2017-07-23 17:59:07 +00:00
Greg Clayton 5b075d636f Added a missing "break;" after seeing a clang warning about potential fall through annotation.
llvm-svn: 308776
2017-07-21 20:20:25 +00:00
Pavel Labath 28e1335d12 XFail TestWithModuleDebugging on linux (bug 33875)
llvm-svn: 308732
2017-07-21 12:51:37 +00:00
Bruce Mitchener 2b13913b12 Fix typo in error message in 'platform status'.
llvm-svn: 308716
2017-07-21 07:08:20 +00:00
Jim Ingham d030991600 Add help text for "expression" telling how to enter multi-line mode.
This seemed natural to us, but wasn't documented anywhere and was
not clear to everybody.

<rdar://problem/33316164>

llvm-svn: 308549
2017-07-19 23:25:42 +00:00
Chris Bieneman 04f3910537 Fix GreenDragon bots
This commit removes a very old deprecated API that was causing compile failures for LLDB on Darwin. Since the comment says we only needed to keep the old API around for a few Xcode builds, and the comment was written 6 years ago... I think this can safely go away.

Failure URL:
http://lab.llvm.org:8080/green/view/LLDB/job/lldb_build_test/29936/console

llvm-svn: 308509
2017-07-19 18:57:16 +00:00
Saleem Abdulrasool f76e099ca7 silence a couple of -Wqual-cast warning from GCC (NFC)
Cast to `const uint8_t *` instead of `uint8_t *` to avoid the warning
from GCC.

  EmulationStateARM.cpp:206:34: warning: cast from type 'const void*' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual]

Cast to `const uint32_t *` and the explicitly cast away the const-ness
of the value.  This seems pretty sketchy as the `DataExtractor` holds a
const reference to the data.  However, this is no worse than before.

  ObjectFilePECOFF.cpp:540:78: warning: cast from type 'const uint8_t* {aka const unsigned char*}' to type 'uint32_t* {aka unsigned int*}' casts away qualifiers [-Wcast-qual]

llvm-svn: 308489
2017-07-19 15:46:21 +00:00
Bruce Mitchener ccbf7987a3 Expose hit count via SBBreakpointLocation.
Summary:
SBBreakpointLocation exposed the ignore count, but didn't expose
the hit count. Both values were exposed by SBBreakpoint and
SBWatchpoint, so this makes things a bit more consistent.

Reviewers: lldb-commits

Subscribers: lldb-commits

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

llvm-svn: 308480
2017-07-19 14:31:19 +00:00
Bruce Mitchener e54a9a268d Fix typos in documentation.
Reviewers: lldb-commits

Subscribers: lldb-commits

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

llvm-svn: 308426
2017-07-19 09:35:58 +00:00
Bruce Mitchener c92c508fd7 Update API headers.
Summary:
* Provide API doc for SBProcess::SaveCore.
* Fix typo in SBAttachInfo doc comments.
* SBBreakpointList: Name some variables same as C++.

Subscribers: lldb-commits

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

llvm-svn: 308425
2017-07-19 09:30:04 +00:00
Tim Hammerquist c635cb223e cmake build needs to run tests AND collect results
CMake target "check-lldb" runs the lldb dotest.py suite, but doesn't
collect the results in a usable format. In adding the arguments
necessary to collect these results, I found some minor bugs in CMake
that prevented dotest overrides from being used. This patch fixes them.

<rdar://problem/33389717> cmake build needs to run tests AND collect results

llvm-svn: 308393
2017-07-18 23:45:06 +00:00
Chris Bieneman f6b8ac28ab [CMake] A few fixups to support building LLDB for iOS
These changes enable proper configuration of LLDB targeting iOS.

llvm-svn: 308378
2017-07-18 21:15:53 +00:00
Chris Bieneman f396708f4c [CMake] Refactor debugserver build system
This refactoring changes two significant things about how the debugserver build system works:

(1) debugserver will include all appropriate architecture support, so we can now build arm or ppc debugservers
(2) debugserver can be built by itself, so you don't have to configure all of LLDB in order to generate debugserver.

llvm-svn: 308377
2017-07-18 21:15:27 +00:00
Chris Bieneman 154a5ff15b [CMake] [NFC] Remove out of date and redundant version requirement
Since we set the minimum required version elsewhere to be higher this actually has meaningful good impact.

llvm-svn: 308376
2017-07-18 21:15:14 +00:00
Pavel Labath f40f8fc415 Fix NetBSD/FreeBSD build after r308304
llvm-svn: 308307
2017-07-18 14:03:47 +00:00
Pavel Labath b6dbe9a99c Clean up lldb-types.h
Summary:
It defined a couple of types (condition_t) which we don't use anymore,
as we have c++11 goodies now. I remove these definitions.

Also it unnecessarily included a couple of headers which weren't
necessary for it's operation. I remove these, and place the includes in
the relevant files (usually .cpp, usually in Host code) which use them.
This allows us to reduce namespace pollution in most of the lldb files
which don't need the OS-specific definitions.

Reviewers: zturner, jingham

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 308304
2017-07-18 13:14:01 +00:00
Pavel Labath 4e138e1d8c Fix linux arm and mips builds broken by r308282
llvm-svn: 308292
2017-07-18 10:42:36 +00:00
Pavel Labath 82abefa4b1 Remove shared pointer from NativeProcessProtocol
Summary:
The usage of shared_from_this forces us to separate construction and
initialization phases, because shared_from_this() is not available in
the constructor (or destructor). The shared semantics are not necessary,
as we always have a clear owner of the native process class
(GDBRemoteCommunicationServerLLDB object). Even if we need shared
semantics in the future (which I think we should strongly avoid),
reverting this will not be necessary -- the owners can still easily
store the native process object in a shared pointer if they really want
to -- this just prevents the knowledge of that from leaking into the
class implementation.

After this a NativeThread object will hold a reference to the parent
process (instead of a weak_ptr) -- having a process instance always
available allows us to simplify some logic in this class (some of it was
already simplified because we were asserting that the process is
available, but this makes it obvious).

Reviewers: krytarowski, eugene, zturner

Subscribers: lldb-commits

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

llvm-svn: 308282
2017-07-18 09:24:48 +00:00
Eugene Zemtsov 20d28a168e Fixing LLDB build after refactoring of clang's MacroInfo
llvm-svn: 308219
2017-07-17 20:50:21 +00:00
Chris Bieneman 7dc58b238d Fix debugserver accepting remote connections
While adding IPv6 support to debugserver I broke handling wildcard addresses and fully qualified address filtering. This patch resolves that bug and adds a test for matching the address "*".

<rdar://problem/32947613>

llvm-svn: 307957
2017-07-13 20:58:13 +00:00
Jim Ingham 055e65f0d4 Enable parsing C++ names generated by lambda functions.
https://reviews.llvm.org/D34911 from Weng Xuetian.

llvm-svn: 307944
2017-07-13 19:48:43 +00:00
Jim Ingham 61949c9f6f Convert a few more tests to use run_to_source_breakpoint.
llvm-svn: 307943
2017-07-13 19:46:21 +00:00
Jim Ingham 30bac79162 Fix a deadlock in the Python interpreter vrs. SIGINT.
The interpreter gets invoked in the sigint handler to cancel
long-running Python operations.  That requires the interpreter
lock, but that may be held by the Python operation that's getting
interrupted, so the mutex needs to be recursive.

<rdar://problem/33179086>

llvm-svn: 307942
2017-07-13 19:45:54 +00:00
Kuba Mracek b244c2bafe Upstreaming a patch from Github: When evaluation user expressions, ignore InstrumentationRuntime breakpoints. (#235)
llvm-svn: 307881
2017-07-13 04:35:27 +00:00
Jim Ingham a6c57dd989 The llvm.org bugzilla moved.
llvm-svn: 307870
2017-07-13 00:36:21 +00:00
Petr Pavlu 8c5dafde49 [MainLoop] Fix possible use of an invalid iterator
Store file descriptors from loop.m_read_fds (if FORCE_PSELECT is
defined) and signals from loop.m_signals that need to be processed in
MainLoop::RunImpl::ProcessEvents() into a separate vector and then
iterate over this container to invoke the callbacks.

This prevents a problem where when the code iterated directly over
m_read_fds/m_signals, a callback invoked from within the loop could
modify these variables and invalidate the loop iterator. This would then
result in an assertion failure in llvm::DenseMapIterator::operator++().

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

llvm-svn: 307782
2017-07-12 12:38:31 +00:00
Ravitheja Addepally fa73e34082 Fixing Android builder
llvm-svn: 307773
2017-07-12 11:54:17 +00:00
Ravitheja Addepally dab1d5f3cd Adding Support for Error Strings in Remote Packets
Summary:
This patch adds support for sending strings along with
error codes in the reply packets. The implementation is
based on the feedback recieved in the lldb-dev mailing
list. The patch also adds an extra packet for the client
to query if the server has the capability to provide
strings along with error replys.

Reviewers: labath, jingham, sas, lldb-commits, clayborg

Reviewed By: labath, clayborg

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

llvm-svn: 307768
2017-07-12 11:15:34 +00:00
Tim Hammerquist 95c003b96f switch on enum should be exhaustive and warning-free
Summary:
Testing the value of type_code against the closed enum TypeCodes
provides statically verifiable completeness of testing. However, one
branch assigns to type_code by casting directly from a masked integer
value. This is currently handled by adding a default: case after
checking each TypeCodes instance. This patch introduces a bool variable
containing the "default" state value, allowing the switch to be
exhaustive, protect against future instances not being handled in the
switch, and preserves the original logic.

This addresses the warning:
warning: default label in switch which covers all enumeration values
[-Wcovered-switch-default]

As an issue of maintainability, the bitmask on line 524 handles the
current values of TypeCodes enum, but this will be invalid if the enum
is extended. This patch does not address this, and a more closed
conversion from cfinfoa -> TypeCodes would help protect against this.

Reviewers: spyffe, lhames, sas

Reviewed By: sas

Subscribers: sas, lldb-commits

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

llvm-svn: 307712
2017-07-11 21:06:20 +00:00
Pavel Labath 21a365ba59 NativeProcessLinux: Fix handling of raise(SIGTRAP)
In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code
value is one of the codes we know about. However, that list was very
incomplete -- for example, we were not handling SI_TKILL/SI_USER,
generated by raise(SIGTRAP). A cursory examination show there are at
least a dozen codes like these that an app can generate, and more can be
added at any point.

So, instead of trying to play catchup, I change the default behavior to
treat an unknown si_code like an ordinary signal. The only reason we
needed to inspect si_code in the first place is because
watchpoint/breakpoints are notified as SIGTRAP, but we already know
about those, and us starting to use a new debug event is far less likely
than somebody introducing a new non-debug event.

I add a test case to TestRaise to verify we are handling raise(SIGTRAP)
in an application properly.

llvm-svn: 307644
2017-07-11 10:38:40 +00:00
Pavel Labath 993f2a4299 NativeProcessLinux: Fix some compiler warnings
llvm-svn: 307636
2017-07-11 09:03:38 +00:00