On FreeBSD ptrace(PT_KILL) is used to terminate the traced process
(as if PT_CONTINUE had been used with SIGKILL as the signal to be
delivered), and is the desired behaviour for ProcessPOSIX::DoDestroy.
On Linux, after ptrace(PTRACE_KILL) the traced process still exists
and can be interrogated. It is only upon resume that it exits as though
it received SIGKILL.
For now I'm committing only the FreeBSD change, until the Linux change
(review D3159) is successfully tested.
http://llvm.org/pr18894
llvm-svn: 205315
For some reason, the libc++ vector<bool> data formatter was essentially a costly no-up, doing everything required of it, except actually generating the child values!
This restores its functionality
llvm-svn: 205259
Since dosep.ty started invoking multiple tests in parallel, the FreeBSD
buildbot occasionally has a failure due to os.mkdir returning EEXIST.
Silently ignore that exception, but reraise any other.
llvm-svn: 205246
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.
It builds cleanly against TOT llvm with xcodebuild. I updated the
cmake files by visual inspection but did not try a build. I haven't
built these sources on any non-Mac platforms - I don't think this
patch adds any code that requires darwin, but please let me know if
I missed something.
In debugserver, MachProcess.cpp and MachTask.cpp were renamed to
MachProcess.mm and MachTask.mm as they picked up some new Objective-C
code needed to launch processes when running on iOS.
llvm-svn: 205113
condition where we could end up killing debugserver (and thus the target) before it had a chance
to detach.
Also fix debugserver to send the OK AFTER it detaches to avoid the same race condition.
<rdar://problem/16202713>
llvm-svn: 205043
if they didn't change, just like it does for
registers. This makes life easier for kernel
debugging and any other situation where values
are read-only.
<rdar://problem/16367795>
llvm-svn: 204764
For small structs, the frame format now prints them as one-liners
This follows the same definition that frame variable does for deciding what a "small struct" is, and as such should be fairly consistent with the variable display in general
llvm-svn: 204762
Add a GetFoundationVersion() to AppleObjCRuntime
This API is used to return and cache the major version of Foundation.framework, which is potentially a useful piece of data to key off of to enable or disable certain ObjC related behaviors (especially in data formatters)
llvm-svn: 204756
This change makes significant improvements in the performance of
calculating a UUID within ObjectFileELF, and handles both running
processes and core files correctly. This does lazy evaluation of
UUID generation and caches the result when calculated.
Change by Piotr Rak.
llvm-svn: 204749
Also added 'import sys' on some tests that are using non-standard
unittest2.skipUnless blocks with code that is intended to do things
that we have more specializes @* attributes for. These skip
conditions were failing to execute due to missing import, causing
darwin-only tests to run on Linux regardless. Will file a bug for
that separately.
llvm-svn: 204747
When there was no process, the expression options were set to not ignore breakpoints. This causes debug info to be generated and causes errors when evaluating simple expressions.
llvm-svn: 204745
"Running multithreaded with n threads (from LLDB_TEST_THREADS)" is
incorrect in the common case, because the thread count is now obtained
from a --threads option, or a default of multiprocessing.cpu_count().
I left the messages in for now as there are some intermittent issues
that happen while running tests multithreaded and it may help in
triaging those. We may wish to just remove them later on.
llvm-svn: 204725
(lldb) b puts
(lldb) expr -g -i0 -- (int)puts("hello")
First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression.
Main features:
- New ObjectFileJIT class that can be easily created for JIT functions
- debug info can now be enabled when parsing expressions
- source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit
- "expr -g --" allows you to single step through your expression function with source code
<rdar://problem/16382881>
llvm-svn: 204682
FreeBSD recently updated to Clang 3.4 and the TestFormatters test case
started failing as it omits the C1 complete object constructor when not
needed.
llvm.org/pr19011
llvm-svn: 204652
Previous check relied on -DLLDB_DISABLE_PYTHON which was not valid as
it is defined in the top level LLDB Makefile which is included after the check.
If this check is moved after the inclusion of top level Makefile then
BUILT_SOURCES is not properly handled. So I am using the scheme present
in the Host/Makefile.
llvm-svn: 204459
PATH_MAX is defined if it is not already defined. A duplicate
definition is removed. The declaration of struct timespec is moved
outside #ifdef _MSC_VER to make it available for mingw.
llvm-svn: 204449
A redefinition of append_if in CompilerRTUtils causes the append_if to fail.
Manually append the values to the flags.
Thanks to Kuba Ober for pointing this out!
llvm-svn: 204311
This is a mechanical cleanup of unused functions. In the case where the
functions are referenced (in comment form), I've simply commented out the
functions. A second pass to clean that up is warranted.
The functions which are otherwise unused have been removed. Some of these were
introduced in the initial commit and not in use prior to that point!
NFC
llvm-svn: 204310
TestPromptFormats appears as though it may be a useful unit test.
Unfortunately, there is no invocation mechanism in place right now. It is
unclear how to add a unit test for this scenario to the existing tests. It
would be ideal to remove this entirely, but I am hopeful that this can/will be
pulled out into a test still since it uses a user accessible interface.
llvm-svn: 204309
so mark as expected fail. And find another way to check that we hit our constructor
breakpoint, so we don't need to expected fail the Disassembly tests.
llvm-svn: 204209
The standard JIT has been discarded in favour of MCJIT. USE_STANDARD_JIT is no
longer defined. Furthermore, the execution engine is now built in
IRExecutionUnit. Simply remove inclusion of both JIT headers.
llvm-svn: 204112
Multichar constants are not portable as the byte order is undefined. Use a
constant value instead. This avoids a warning when compiling with gcc 4.8+
(-Wmultichar) and makes the code more portable.
llvm-svn: 204110
The gain with multithreading is large, but turning it on requires
an environment variable and so is hard for users to discover. This
gives users a way to discover the feature by printing out a message
when the environment variable is not set.
llvm-svn: 204018
libxml2's include path was unconditionally set to /usr/include/libxml2. This
would work previously, however, Mavericks removed the /usr/include directory.
Since LLDB already requires clang, which via LLVM's build infrastructure
searches for libxml2, we have a proper include path for libxml2. If
LIBXML2_FOUND is set, do not touch the libxml2 search path. Instead, allow the
clang's definition to propagate throughout the LLVM build. Otherwise, switch to
find_package(LibXml2) as clang does. This will ensure that the correct path is
used for libxml2 irrespective of the platform.
Furthermore, treat libxml2 as a system provided library. It is not part of the
LLVM source base so it is of little value to enable all warnings on its headers.
This unifies the treatment of libxml2 across clang and LLDB.
llvm-svn: 203955
for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), but also
the behavior of step-in/step-out and step-over when they step out of the frame they started in.
I also added as a proof of concept of this reworking a mode for stepping where stepping out of a frame
into a frame with no debug information will continue stepping out till it arrives at a frame that does
have debug information. This is useful when you are debugging callback based code where the callbacks
are separated from the code that initiated them by some library glue you don't care about, among other
things.
llvm-svn: 203747