Added missing header files to the Xcode project.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197527 91177308-0d34-0410-b5e6-96231b3b80d8
Fix how Queue/QueueItem weak pointers are initialized in the ctors.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197541 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a bug introduced in asynchronous packet sends.  We were not setting the packet result, and so
it looked like the async packet send always failed.

<rdar://problem/15657157>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197543 91177308-0d34-0410-b5e6-96231b3b80d8
When ProcessMachCore::DoLoadCore() finds *BOTH* a user process dyld and a mach kernel
binary, change to prefer the mach kernel binary by default.


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

Fixed a crasher that would only occur if Xcode attaches to a remote process first, then launches. 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197546 91177308-0d34-0410-b5e6-96231b3b80d8
Workaround QEMU GDB server issue. 

During testing I observed QEMU send "$T02thread:01;#04" upon connection,
before any command from LLDB.  This change from gclayton accepts (and
discards) a packet immediately after sending the initial ack, to flush
the GDB remote pipeline.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197579 91177308-0d34-0410-b5e6-96231b3b80d8
Code reorganization in PlatformDarwin for how the libdispatch
offsets structure is read & saved in the platform object -- soon
we'll be getting more than the queue name offset out of this
structure so we'll need to reuse the information in other methods.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197620 91177308-0d34-0410-b5e6-96231b3b80d8
Fix std::string initialization in Queue ctor.
<rdar://problem/15694319> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197631 91177308-0d34-0410-b5e6-96231b3b80d8
Fix return type of ReadLibdispatchOffsetsAddress.


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

Allow the root XPC launcher to launch any target as root.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197634 91177308-0d34-0410-b5e6-96231b3b80d8
Revert one part of Ashok Thirumurthi's patch from September 16, r190812.

In those set of patches, Ashok changed Module::ResolveSymbolContextForAddress 
so that if it failed to find a symbol for a pc, it could back up
the pc value by 1 and re-search for a symbol.

His change to RegisterContextLLDB.cpp partially duplicates that
behavior but it also removes the separate case where we find a
Symbol for the pc address but it's the wrong symbol -- we need to
handle this as well as the lookup-by-pc-finds-no-symbol case.

The most obvious fallout from this regression was that lldb on
Mac OS X couldn't backtrace past __assert_rtn() which tail-calls 
abort().  e.g.

(lldb) bt
* thread #1: tid = 0x5d6ea1, 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8eb5835c libsystem_pthread.dylib`pthread_kill + 92
    frame #2: 0x00007fff8852ab1a libsystem_c.dylib`abort + 125
    frame #3: 0x00007fff884f49bf libsystem_c.dylib`__assert_rtn + 321
    frame #4: 0x0000000100000f2c a.out`main + 124

(lldb) dis -c 3 -s 0x7fff884f49b3
libsystem_c.dylib`__assert_rtn + 309:
   0x7fff884f49b3:  movq   %rax, -0x11b96242(%rip)   ; gCRAnnotations + 8
   0x7fff884f49ba:  callq  0x7fff8854fd2c            ; symbol stub for: abort

libsystem_c.dylib`basename:
   0x7fff884f49bf:  pushq  %rbp
(lldb) 

in this case, __assert_rtn() is immediately followed by basename() and 
the changes in r190812 didn't back up the pc value to get the correct
function name / unwind info.

<rdar://problem/15367233> 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197655 91177308-0d34-0410-b5e6-96231b3b80d8
Partially revert a patch from Ashok Thirumurthi in r191430.
The original code was not completely correct, but a form of
this check is necessary to avoid an infinite recursion on
some unwind cases where a function unwinds to itself with the
same CFA.  Ashok thought the recursion would be caught in
RegisterContextLLDB but this one isn't - we still need it here.
<rdar://problem/15664282> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197761 91177308-0d34-0410-b5e6-96231b3b80d8
Adjust to the new way LLVM emits modules: it doesn't
specify a pointer size until code gen.  So we just
make all our pointer-sized integer literals 64-bit.
That doesn't seem to hurt anything.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197774 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed the AST importer to ensure that base classes
of Objective-C classes are completed, and that
variables of Objective-C types have their types
completed when the variables are reported.

This fixes a long-standing issue where ivars did
not show up correctly on 32-bit OS X.

<rdar://problem/12184093> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197775 91177308-0d34-0410-b5e6-96231b3b80d8
FormatNavigator has long stopped navigating anything - the generation of possible formatters matches is now done elsewhere
So, rename the class for what it truly is: a FormattersContainer
Also do a bunch of related text substitutions in the interest of overall naming clarity



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197795 91177308-0d34-0410-b5e6-96231b3b80d8
All data formatters come in "match exact" and "match regex" styles
This refactoring makes it less error-prone to define formatter types with the correct match schemes



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197800 91177308-0d34-0410-b5e6-96231b3b80d8
Updated our IR processing to reflect best practices
for making pointer-valued constants.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197829 91177308-0d34-0410-b5e6-96231b3b80d8
Harden the Objective-C runtime against weird method
signatures.

<rdar://problem/15631996>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197843 91177308-0d34-0410-b5e6-96231b3b80d8
Any time ProcessGDBRemote tries to get the remote's ProcessArchitecture,
it needs to fall back to using the HostArchitecture if a valid one is not
returned.  When doing low-level system debugging we may not have a process
(or the remote stub may not support the qProcessInfo packet) in which case
we should fall back to the architecture we determined via qHostInfo.
<rdar://problem/15713180> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197857 91177308-0d34-0410-b5e6-96231b3b80d8
There is no need to use the expression parser to generate true and false - writing in a buffer is good enough

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