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
The one-line printing facility is used by StringSummaryFormat, but that's no reason to have it be part of the public interface of ValueObjectPrinter
That's what friendship is for



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197859 91177308-0d34-0410-b5e6-96231b3b80d8
Add a new-line



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197860 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/14822563> - Do not attempt to use a null VariableList or crashes will ensue

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197862 91177308-0d34-0410-b5e6-96231b3b80d8
Centralize the code for GetValueAsCString() in TypeFormatImpl (the implementing class of "type format ...")
TypeFormatImpl used to just wrap a Format (and Flags for matching), and then ValueObject itself would do the printing deed
With this checkin, the responsibility of generating a value string is centralized in the data formatter (as it should, and already is for summaries) 

This change is good practice per se, and should also enable us to extend the type format mechanism in a cleaner way



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197874 91177308-0d34-0410-b5e6-96231b3b80d8
Add decorator for GDB connect test failing on FreeBSD

llvm.org/pr18313


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@197910 91177308-0d34-0410-b5e6-96231b3b80d8
Remove wait_for_launch parameter from DoAttachToProcessWithName(). This parameter is redundant as this information is already provided by the ProcessAttachInfo parameter.

CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2463

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