Fixed the process_events.py example to be able to specify the platform and also use the debugger's listener.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185027 91177308-0d34-0410-b5e6-96231b3b80d8
Update the platform options help strings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185028 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/14281898>

Much faster way to get dirty size.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185033 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the process's reservation cache and don't
bother checking if a region is safe to use.  In
cases where regions need to be synthesized rather
than properly allocated, the memory reads required
to determine whether the area is used are

- insufficient, because intermediate locations
  could be in use, and

- unsafe, because on some platforms reading from
  memory can trigger events.

All this only makes a difference on platforms
where memory allocation in the target is impossible.
Behavior on platforms where it is possible should
stay the same.

<rdar://problem/14023970>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185046 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/14195566>

Found a race condition when killing an application where the state could be set to exited by the waitpid_thread() _before_ we call task resume (via MachProcess::PrivateResume()) in MachProcess::Kill().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185048 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed IRExecutionUnit so that it looks up addresses
correctly.  We have been getting lucky since most
expressions generate only one section (or the first
code section contains all the code), but sometimes
it actually matters.

<rdar://problem/14180236>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185054 91177308-0d34-0410-b5e6-96231b3b80d8
Adding support for extracting line table information from .o files that do not have aranges



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185055 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed the IRInterpreter to reject any code that
has more than one function with a body.  This
prevents declarations e.g. of blocks from being
passed to the IRInterpreter; they must pass
through to the JIT.

<rdar://problem/14180236>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185057 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup of IRForTarget.  Removed some relics of
the time when the IRInterpreter ran inside
IRForTarget.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185088 91177308-0d34-0410-b5e6-96231b3b80d8
A bit more cleanup on the process_events.py to use best practices for event handling.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185089 91177308-0d34-0410-b5e6-96231b3b80d8
Prevent race in when stopping a "read thread"

Both StopReadThread and the thread being stopped set the thread id to
0 after m_read_thread_enabled was set to false. If the thread being
stopped got there first then StopReadThread called pthread_join on an
invalid thread number. This is not a Good Thing,

Should fix a fairly regular segfault when quitting on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185107 91177308-0d34-0410-b5e6-96231b3b80d8
Move sys/sysctl.h include after its dependency sys/types.h



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185147 91177308-0d34-0410-b5e6-96231b3b80d8
Don't check for "are there any loaded sections" before trying to resolve a breakpoint site.  We've already got a process,
and any breakpoints with section relative addresses won't resolve their load addresses so they will error out at that point.

<rdar://problem/13900130>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185170 91177308-0d34-0410-b5e6-96231b3b80d8
PathMappingList doesn't need a virtual destructor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185207 91177308-0d34-0410-b5e6-96231b3b80d8
ArchSpec doesn't need a virtual destructor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185208 91177308-0d34-0410-b5e6-96231b3b80d8
FileSpec destructor doesn't need to be virtual.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185210 91177308-0d34-0410-b5e6-96231b3b80d8
Default parameters are evil and should not be used. Case and point this checkin that fixes implicit conversions that were happening.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185217 91177308-0d34-0410-b5e6-96231b3b80d8
Hitherto the IRForTarget infrastructure has mainly
been suitable for preparing a single IR function
for operation in the target.  However, using blocks
and lambdas creates other IR functions that also
need to be processed.

I have audited IRForTarget to make it process
multiple functions.  Where IRForTarget would add
new instructions at the beginning of the main
expression function, it now adds them on-demand
in the function where they are needed.  This is
enabled by a system of FunctionValueCaches, which
invoke a lambda to create or derive the values as
needed, or report the result of that lambda if it
has already been called for the given function.

<rdar://problem/14180236>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185224 91177308-0d34-0410-b5e6-96231b3b80d8
Missed a place where we have to pass the source location twice to FunctionDecl::Create.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185233 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/14309010>

OS Plugins' __init__ method takes two arguments: (self,process)

I was erroneously passing the session_dict as well as part of my PyCallable changes and that caused plugins to fail to work



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185240 91177308-0d34-0410-b5e6-96231b3b80d8