Correct header guard #endif comments


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196381 91177308-0d34-0410-b5e6-96231b3b80d8
Added a new directory type for the "bool Host::GetLLDBPath (PathType path_type, FileSpec &file_spec)" function: ePathTypeLLDBTempSystemDir

This will get the temporary directory on the current system.

Removed a call to tmpnam() and replaced it with a call to mktemp() using a template that will be in the temp directory.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196397 91177308-0d34-0410-b5e6-96231b3b80d8
Switch local launching of debugserver over to always use a FIFO in order to handshake with the launched debugserver.

This helps ensure that the launched debugserver is ready and listening for a connection. Prior to this we had a race condition.

Consolidate the launching of debugserver into a single place: a static function in GDBRemoteCommunication.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196401 91177308-0d34-0410-b5e6-96231b3b80d8
Remove log line that was left in accidentally.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196403 91177308-0d34-0410-b5e6-96231b3b80d8
Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available when using posix_spawn to spawn processes to close all file handles.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196404 91177308-0d34-0410-b5e6-96231b3b80d8
Allow the hostname to be specified when asking a platform to launch another debugserver in case you want to change it.

The GDB server remote platform how has the debugserver that are launched on iOS devices to use localhost due to the use of a USB mux.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196405 91177308-0d34-0410-b5e6-96231b3b80d8
Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196413 91177308-0d34-0410-b5e6-96231b3b80d8
Provide an easy way for synthetic child provider front ends to declare themselves “invalid”
This is not being used yet, and in practice, more refactoring would be required to make this fully practical
In practice, the way this should work is that CalculateNumChildren(), GetChildAtIndex(), GetIndexOfChildWithName() and MightHaveChildren() should all default to failure values when m_valid == false. Update() should be the only function actually setting/clearing the flag upon inspecting the backend ValueObject, if it determines it to be in an incongruent state
Given refactoring of the FrontEnd APIs, this work could be automatically performed without the individual providers having to replicate this logic
The way this works now is that each front end picks one or more “key ivars” and keys off those to detect invalidity
This is a baby step 0 to a better world

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196452 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the build failure of lldb wrt clang recent change. Patch by Todd Fiala

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196483 91177308-0d34-0410-b5e6-96231b3b80d8
Revert: "Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed"

Does not respect the prefix




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196499 91177308-0d34-0410-b5e6-96231b3b80d8
Extends StringExtractorGDBRemote to support debugger packets.

CC: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196525 91177308-0d34-0410-b5e6-96231b3b80d8
Added two new test case decorator functions: @skipIfRemote and @skipIfRemoteDueToDeadlock. 

@skipIfRemote is used to decorate test cases that don't make sense to run remotely.

@skipIfRemoteDueToDeadlock indicates these tests need to be looked at and currently deadlock the running of the test suite when run on remote systems. These issues should be fixed soon.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196543 91177308-0d34-0410-b5e6-96231b3b80d8
Modified local spawning in debugserver processes to use a new --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver.

This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to.

Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format:

listen://<port>

But now it can accept:

listen://<port>         // Listen for connection from localhost on port <port>
listen://<host>:<port>  // Listen for connection from <host> and <port>    
listen://*:<port>       // Listen for connection from any host on port <port>




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196547 91177308-0d34-0410-b5e6-96231b3b80d8
For logical backtrace work, lldb needs to track Module unloads etc & symoblicate an address based on a point in time

<rdar://problem/15314403> 

This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196557 91177308-0d34-0410-b5e6-96231b3b80d8
Tell CMake about recently added SectionLoadHistory.cpp

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196566 91177308-0d34-0410-b5e6-96231b3b80d8
Tell CMake about the SystemRuntime plugin.
This fixes CMake build on Darwin.



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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196577 91177308-0d34-0410-b5e6-96231b3b80d8
Replace all in_port_t with uint16_t to avoid compilation issues on different systems.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196586 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed the GDBRemoteCommuncation to return a new GDBRemoteCommuncation::PacketResult enum for all packet sends/receives.

<rdar://problem/15600045>

Due to other recent changes, all connections to GDB servers that didn't support the "QStartNoAckMode" packet would cause us to fail to attach to the remote GDB server.

The problem was that SendPacket* and WaitForResponse* packets would return a size_t indicating the number of bytes sent/received. The other issue was WaitForResponse* packets would strip the leading '$' and the trailing "#CC" (checksum) bytes, so the unimplemented response packet of "$#00" would get stripped and the WaitForResponse* packets would return 0.

These new error codes give us flexibility to to more intelligent things in response to what is returned. 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@196610 91177308-0d34-0410-b5e6-96231b3b80d8
Add a setting to allow users to enable expressions that crash LLDB to show up in crash logs.

<rdar://problem/11549320> 




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