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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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