Remove extra "/" character from paths resolved in iOS SDKs and also be sure to update the SDK directory infos if needed before we start using m_sdk_directory_infos.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221907 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed "SBTarget SBDebugger::CreateTarget (const char *filename)" to use the same semantics as other SBDebugger::CreateTarget() functions.

The issues were:
- If you called this function with any arch other than the default target architecture, creating the target would fail because the Target::GetDefaultArchitecture() would not match the single architecture in the file specified. This caused running the test suite remotely with lldb-platform to fail many many tests due to the bad target.
- It would specify the currently selected platform which might not work for the specified platform

All other SBDebugger::CreateTarget calls do not assume an architecture or platform and if they aren't specified, they don't auto select the wrong one for you.

With this fix, SBTarget SBDebugger::CreateTarget (const char *filename) now behaves like the other SBDebugger::CreateTarget() variants.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221908 91177308-0d34-0410-b5e6-96231b3b80d8
Specify checksums properly for llgs test suite packets.

Summary: These checksums are ignored by llgs but some implementations require them to be specified properly.

Test Plan: Re-run llgs tests with the checksums and make sure we don't break anything.

Reviewers: tfiala, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D6254

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221927 91177308-0d34-0410-b5e6-96231b3b80d8
fix minor comment typo

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221950 91177308-0d34-0410-b5e6-96231b3b80d8
Properly specify the regex used to match register indexes.

Summary: Something like "core:1" would match and try to be interpreted by the following code otherwise.

Test Plan: Run tests and make sure the ones failing previously now pass.

Reviewers: tfiala, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D6257

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@221980 91177308-0d34-0410-b5e6-96231b3b80d8
Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle leakage to a forked child process.

http://reviews.llvm.org/D6204


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222004 91177308-0d34-0410-b5e6-96231b3b80d8
add Makefile rule for test program CREATE_STD_THREADS

Effectively removes -lpthreads from linux/gcc build of test programs in test/api/multithreaded. This was done due to that combination causing a test program to hang due, likely due to an issue with gcc linker and libstdc++ conflicting pthreads code in test program and pthread used by lldb.  Issue has been documented at:
http://llvm.org/bugs/show_bug.cgi?id=21553

Differential Revision: http://reviews.llvm.org/D5838

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222031 91177308-0d34-0410-b5e6-96231b3b80d8
Removed a couple of static helpers in the data formatters, replaced with new general logic in StringLexer

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222058 91177308-0d34-0410-b5e6-96231b3b80d8
Fix examine-threads to build for arm64.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222059 91177308-0d34-0410-b5e6-96231b3b80d8
I don't need this ivar. It was probably there from the olden days where dynamic type support was flakey. Remove and save space

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222063 91177308-0d34-0410-b5e6-96231b3b80d8
For some reason, sometimes the directory paths that clang emits have internal
relative paths, like:

/whatever/llvm/lib/Sema/../../include/llvm/Sema/

That causes problems with our type uniquing, since we use the declaration file
and line as one component of the uniquing, and different ways of getting to the
same file will have different directory spellings, though they are functionally
equivalent.  We end up with two copies of the exact same type because of this, 
and that makes the expression parser give "duplicate type" errors.

I added a method to resolve paths with ../ in them and used that in the FileSpec::Equals,
for comparing Declarations and for doing Breakpoint compares as well, since they also
suffer from this if you specify breakpoints by full path (since nobody knows what
../'s to insert...)

<rdar://problem/18765814>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222075 91177308-0d34-0410-b5e6-96231b3b80d8
Add a little sketch of a program that can extract unwind
information from the compact unwind section used on darwin
for exception handling, and dump that information..

The UNWIND_X86_64_MODE_RBP_FRAME and UNWIND_X86_64_MODE_DWARF
entries look to be handled correctly.

UNWIND_X86_64_MODE_STACK_IMMD and UNWIND_X86_64_MODE_STACK_IND 
are still a work in progress.

Only x86_64 is supported right now.  Given that this is an
experiment in parsing the section contents, I don't expect to
add other architectures; they are trivial variations on this
arch.  There exists a real dumper included in the Xcode tools, 
unwinddump.



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

This test has intermittently failed on FreeBSD for quite some time when
run as part of the full test suite.  It generally passes when run by
itself.  Mark as expected failure for now to reduce buildbot noise.

llvm.org/pr15039 test fails intermittently on FreeBSD


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222134 91177308-0d34-0410-b5e6-96231b3b80d8
Whitespace cleanup and remove non-canonical headers



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222135 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Darwin and FreeBSD OS type detection

Obtained in part from http://reviews.llvm.org/D6290


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222136 91177308-0d34-0410-b5e6-96231b3b80d8
[ProcessWindows] Implement read / write process memory.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222147 91177308-0d34-0410-b5e6-96231b3b80d8
[ProcessWindows] Create a TargetThreadWindows class.

This creates a TargetThreadWindows class and updates the thread
list of the Process with the main thread.  Additionally, we
fill out a few more overrides of Process base class methods.  We
do not yet update the thread list as threads are created and/or
destroyed, and we do not yet propagate stop reasons to threads as
their states change.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222148 91177308-0d34-0410-b5e6-96231b3b80d8
Reformat lldb-mi using clang-format.

Courtesy of dawn@burble.org.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222150 91177308-0d34-0410-b5e6-96231b3b80d8
Fix some issue with running the test suite remotely on iOS.

- Added a new "--apple-sdk" flag that can be specified on Darwin only so the correct cross compilers can be auto-selected without having to specify the "--compiler" flag.
- Set SDKROOT if needed



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@222153 91177308-0d34-0410-b5e6-96231b3b80d8
Fix buildSwigWrapperClasses.py after recent break.

A re-ordering of some enum values exposed a lingering bug where an
invalid key was indexing a dictionary.

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