History log of /external/lldb/source/Core/ConnectionFileDescriptor.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b04386b82a935f0db036ab33ad095115e708d439 24-Jun-2013 Ed Maste <emaste@freebsd.org> Use canonical termios.h location


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
a81bf231d250f6ea4120e98a4c0b2510556a41e5 16-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13657900>

Special handling for file descriptor connections that are tty files.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
00af72e395d138f459192b7f5450fa4c7854f135 03-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13384801>

Make lldb_private::RegularExpression thread safe everywhere. This was done by removing the m_matches array from the lldb_private::RegularExpression class and putting it into the new lldb_private::RegularExpression::Match class. When executing a regular expression you now have the option to create a lldb_private::RegularExpression::Match object and pass a pointer in if you want to get parenthesized matching. If you don't want any matching, you pass in NULL. The lldb_private::RegularExpression::Match object is initialized with the number of matches you desire. Any matching strings are now extracted from the lldb_private::RegularExpression::Match objects. This makes the regular expression objects thread safe and as a result many more regex objects were turned into static objects that end up using a local lldb_private::RegularExpression::Match object when executing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
f88bf3d150de0d7818d0cc65d104d58521c60699 26-Mar-2013 Greg Clayton <gclayton@apple.com> Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
db083f6eb104c21b15c16536ac3bf0997c07d8bb 16-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13121056>

Fixed a crasher when the ConnectionFileDescriptor was used in a process with over FD_SETSIZE (1024) files open. It would corrupt the stack and cause the stack checker to assert and kill the program.

The final fix was to "#define _DARWIN_UNLIMITED_SELECT" at the top of the one and only file that uses select () in the LLDB codebase and then make an array of "fd_set" objects so they can handle more than 1024 file descriptors. The new code can handle as many file descriptors as a process can create.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
851e30ec6a1b1d2c154bb7d69ed0d05b5fd14705 18-Sep-2012 Greg Clayton <gclayton@apple.com> Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
f46695699eba3a0afa5e339aa3224e44af9cd8bf 09-Aug-2012 Greg Clayton <gclayton@apple.com> Fixed the delay that was happening when quitting lldb from the command line. We weren't initializing the command pipes when constructing a ConnectionFileDescriptor with a file descriptor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
b4386999feb061d76a5d24fa6731898731f1e071 17-Jul-2012 Jim Ingham <jingham@apple.com> Lock around reading as well as connecting & disconnecting so we don't start reading after
someone has set our file descriptor to -1 and crash in FD_SET...
<rdar://problem/11653966>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
3ce4df5be58f188270210927a6e25a0192b60efc 12-Jul-2012 Jim Ingham <jingham@apple.com> Add a command channel to wait on along with the file descriptor the ConnectionFileDescriptor class is managing, so we can always pop ourselves out of our select call regardless of how well behaved the channel we are talking to is.

<rdar://problem/11448282>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
db9d6f47ab38e25c3efcbfa05780bf9a127fd259 31-Jan-2012 Greg Clayton <gclayton@apple.com> Cleaned up the Communication class when it tears down ConnectionFileDescriptor
instances to not pthread_cancel the read threads and wreak havoc on the mutex
in our ConnectionFileDescriptor class.

Also cleaned up some shutdown delays.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
8a7970845318d20e840cca5185df6f2134150fd4 27-Jan-2012 Greg Clayton <gclayton@apple.com> Disable the ConnectionFileDescriptor mutex for now as it is deadlocking our
test suite and I need to investigate this.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
aa119ddd6de5a572175d56dd033181a1f3dd19f6 27-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10760649>

Fixed another double file descriptor close issue that could occur when destroying a ProcessGDBRemote() object. There was a race which was detected by our fd_interposing library:

error: /Applications/Xcode.app/Contents/MacOS/Xcode (pid=55222): close (fd=60) resulted in EBADF:
0 libFDInterposing.dylib 0x00000001082be8ca close$__interposed__ + 666
1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3 LLDB 0x00000001194fe249 lldb_private::ConnectionFileDescriptor::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 835
4 LLDB 0x00000001194fc320 lldb_private::Communication::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 634
5 LLDB 0x000000011959c7f4 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote&, unsigned int) + 228
6 LLDB 0x000000011959c6b5 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSeconds(StringExtractorGDBRemote&, unsigned int) + 49
7 LLDB 0x0000000119629a71 GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse(ProcessGDBRemote*, char const*, unsigned long, StringExtractorGDBRemote&) + 509
8 LLDB 0x00000001195a4076 ProcessGDBRemote::AsyncThread(void*) + 514
9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335
11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13

fd=60 was previously closed with this event:
pid=55222: close (fd=60) => 0
0 libFDInterposing.dylib 0x00000001082be870 close$__interposed__ + 576
1 LLDB 0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2 LLDB 0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3 LLDB 0x00000001194fbf00 lldb_private::Communication::Disconnect(lldb_private::Error*) + 92
4 LLDB 0x00000001195a2a77 ProcessGDBRemote::StopAsyncThread() + 89
5 LLDB 0x00000001195a2bf6 ProcessGDBRemote::DoDestroy() + 310
6 LLDB 0x00000001195f938d lldb_private::Process::Destroy() + 85
7 LLDB 0x0000000118819b48 lldb::SBProcess::Kill() + 72
8 DebuggerLLDB 0x0000000117264358 DBGLLDBSessionThread(void*) + 4450
9 LLDB 0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10 libsystem_c.dylib 0x00007fff8ca028bf _pthread_start + 335
11 libsystem_c.dylib 0x00007fff8ca05b75 thread_start + 13

fd=60 was created with this event:
pid=55222: socket (domain = 2, type = 1, protocol = 6) => fd=60
0 libFDInterposing.dylib 0x00000001082bc968 socket$__interposed__ + 600
1 LLDB 0x00000001194fd75f lldb_private::ConnectionFileDescriptor::ConnectTCP(char const*, lldb_private::Error*) + 179
.....







git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
838c27d71d7e501635e2dc8e48891c678aab2bad 21-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10711649>

A Small tweak to handle a zero timeout.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
64f8cab7174fd693e8dfe6a8b7dcba34ce97cf90 21-Jan-2012 Jim Ingham <jingham@apple.com> Our Read functions were taking a timeout of UINT32_MAX to mean wait forever, but then
we didn't implement that in setting the socket option.
<rdar://problem/10711649>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
bba48364984bada19ba2aff2993ec583927d8150 14-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/9731573>

Fixed two double "int close(int fd)" issues found by our file descriptor
interposing library on darwin:

The first is in SBDebugger::SetInputFileHandle (FILE *file, bool transfer_ownership)
where we would give our FILE * to a lldb_private::File object member variable and tell
it that it owned the file descriptor if "transfer_ownership" was true, and then we
would also give it to the communication plug-in that waits for stdin to come in and
tell it that it owned the FILE *. They would both try and close the file.

The seconds was when we use a file descriptor through ConnectionFileDescriptor
where someone else is creating a connection with ConnectionFileDescriptor and a URL
like: "fd://123". We were always taking ownwership of the fd 123, when we shouldn't
be. There is a TODO in the comments that says we should allow URL options to be passed
to be able to specify this later (something like: "fd://123?transer_ownership=1"), but
we can get to this later.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
2f28ece553d2ef0d7b3e8d1419020591ec3818f9 04-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10507811>

Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.

Also fixed up a bunch of system calls that weren't properly checking
for EINTR.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
ea6d783624f0b7dcbf3773cb31d6e4fcd4f93b6c 22-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for platforms without sa_len to SocketAddress, and modify
some code to use it

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
d5b3e3c662c967feb455a01f307c3f4bc318eec9 19-Jul-2011 Greg Clayton <gclayton@apple.com> Added some more functionality to SocketAddress and modified
ConnectionFileDescriptor to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
ac304e4cbd1005210661720d5f2232f85b08c195 19-Jul-2011 Greg Clayton <gclayton@apple.com> Abstract "struct sockaddr", "struct sockaddr_in", "struct sockaddr_in6" and
"struct sockaddr_storage" into a new host class called SocketAddress. This
will allow us to control the host specific implementations (such as how to
get the length) into a single Host specific class.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
8d2ea2888a4acb7f140f9af64ddd2b16b2dee870 17-Jul-2011 Greg Clayton <gclayton@apple.com> Added a boolean to the pure virtual lldb_private::Process::CanDebug(...)
method so process plug-ins that are requested by name can answer yes when
asked if they can debug a target that might not have any file in the target.

Modified the ConnectionFileDescriptor to have both a read and a write file
descriptor. This allows us to support UDP, and eventually will allow us to
support pipes. The ConnectionFileDescriptor class also has a file descriptor
type for each of the read and write file decriptors so we can use the correct
read/recv/recvfrom call when reading, or write/send/sendto for writing.

Finished up an initial implementation of UDP where you can use the "udp://"
URL to specify a host and port to connect to:

(lldb) process connect --plugin kdp-remote udp://host:41139

This will cause a ConnectionFileDescriptor to be created that can send UDP
packets to "host:41139", and it will also bind to a localhost port that can
be given out to receive the connectionless UDP reply.

Added the ability to get to the IPv4/IPv6 socket port number from a
ConnectionFileDescriptor instance if either file descriptor is a socket.

The ProcessKDP can now successfully connect to a remote kernel and detach
using the above "processs connect" command!!! So far we have the following
packets working:
KDP_CONNECT
KDP_DISCONNECT
KDP_HOSTINFO
KDP_VERSION
KDP_REATTACH

Now that the packets are working, adding new packets will go very quickly.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
d52d00f4edb746ba458a3e659699160952dc925e 16-Jul-2011 Greg Clayton <gclayton@apple.com> Completed more work on the KDP darwin kernel debugging Process plug-in.
Implemented connect, disconnect, reattach, version, and hostinfo.

Modified the ConnectionFileDescriptor class to be able to handle UDP.

Added a new Stream subclass called StreamBuffer that is backed by a
llvm::SmallVector for better efficiency.

Modified the DataExtractor class to have a static function that can
dump hex bytes into a stream. This is currently being used to dump incoming
binary packet data in the KDP plug-in.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
1e5b02176d6952d0679479926fa557534313472b 15-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to connect using "tcp://<host>:<port>" which is the
same as the old "connect://<host>:<port>". Also added the ability to
connect using "udp://<host>:<port>" which will open a connected
datagram socket. I need to find a way to specify a non connected
datagram socket as well.

We might need to start setting some settings in the URL itself,
maybe something like:

udp://<host>:<port>?connected=yes
udp://<host>:<port>?connected=no

I am open to suggestions for URL settings.

Also did more work on the KDP darwin kernel plug-in.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
d0691fe6327b0edaadf907008b26c55e78c1ca2f 03-Jul-2011 Greg Clayton <gclayton@apple.com> When we use the "fd://%u" for file descriptors, we need to detect if this is
a file or socket. We now make a getsockopt call to check if the fd is a socket.

Also, the previous logic in the GDB communication needs to watch for success
with an error so we can deal with EAGAIN and other normal "retry" error codes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
20fe30ca112121e963dc5ed0547b46bca72f9620 19-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Switch from USEC_PER_SEC/NSEC_PER_SEC/NSEC_PER_USEC to TimeValue constants

Fixes the Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
63afdb07641f04aa7b60d895120b056124d3469b 17-Jun-2011 Greg Clayton <gclayton@apple.com> Improved the packet throughput when debugging with GDB remote by over 3x on
darwin (not sure about other platforms).

Modified the communication and connection classes to not require the
BytesAvailable function. Now the "Read(...)" function has a timeout in
microseconds.

Fixed a lot of assertions that were firing off in certain cases and replaced
them with error output and code that can deal with the assertion case.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
d976b0ee3aa6d32105ac7a9183f4601544563089 29-May-2011 Greg Clayton <gclayton@apple.com> Fixed an issue that could cause LLDB to spin indefinitely.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
5fba9eec8d79109bf44d5b0a59dda377c65544c5 19-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to sign extend a Scalar at any bit position for integer
types.

Added the abilty to set a RegisterValue type via accessor and enum.

Added the ability to read arguments for a function for ARM if you are on the
first instruction in ABIMacOSX_arm.

Fixed an issue where a file descriptor becoming invalid could cause an
inifnite loop spin in the libedit thread.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
180546b3feb8c7bcca70a56776a7c4fad99ba09c 30-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to set the Platform path for a module through the SBModule
interface.

Added a quick way to set the platform though the SBDebugger interface. I will
actually an a SBPlatform support soon, but for now this will do.

ConnectionFileDescriptor can be passed a url formatted as: "fd://<fd>" where
<fd> is a file descriptor in the current process. This is handy if you have
services, deamons, or other tools that can spawn processes and give you a
file handle.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
b72d0f098e45936fa72e26b1a026c603e17e2d6c 12-Apr-2011 Greg Clayton <gclayton@apple.com> Moved the execution context that was in the Debugger into
the CommandInterpreter where it was always being used.

Make sure that Modules can track their object file offsets correctly to
allow opening of sub object files (like the "__commpage" on darwin).

Modified the Platforms to be able to launch processes. The first part of this
move is the platform soon will become the entity that launches your program
and when it does, it uses a new ProcessLaunchInfo class which encapsulates
all process launching settings. This simplifies the internal APIs needed for
launching. I want to slowly phase out process launching from the process
classes, so for now we can still launch just as we used to, but eventually
the platform is the object that should do the launching.

Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able
to launch processes with all of the new eLaunchFlag settings. Modified any
code that was manually launching processes to use the Host::LaunchProcess
functions.

Fixed an issue where lldb_private::Args had implicitly defined copy
constructors that could do the wrong thing. This has now been fixed by adding
an appropriate copy constructor and assignment operator.

Make sure we don't add empty ModuleSP entries to a module list.

Fixed the commpage module creation on MacOSX, but we still need to train
the MacOSX dynamic loader to not get rid of it when it doesn't have an entry
in the all image infos.

Abstracted many more calls from in ProcessGDBRemote down into the
GDBRemoteCommunicationClient subclass to make the classes cleaner and more
efficient.

Fixed the default iOS ARM register context to be correct and also added support
for targets that don't support the qThreadStopInfo packet by selecting the
current thread (only if needed) and then sending a stop reply packet.

Debugserver can now start up with a --unix-socket (-u for short) and can
then bind to port zero and send the port it bound to to a listening process
on the other end. This allows the GDB remote platform to spawn new GDB server
instances (debugserver) to allow platform debugging.







git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
58e26e0935138225477fd61283215ceff2068899 24-Mar-2011 Greg Clayton <gclayton@apple.com> Did a lot more work on abtracting and organizing the platforms.

On Mac OS X we now have 3 platforms:
PlatformDarwin - must be subclassed to fill in the missing pure virtual funcs
but this implements all the common functionality between
remote-macosx and remote-ios. It also allows for another
platform to be used (remote-gdb-server for now) when doing
remote connections. Keeping this pluggable will allow for
flexibility.
PlatformMacOSX - Now implements both local and remote macosx desktop platforms.
PlatformRemoteiOS - Remote only iOS that knows how to locate SDK files in the
cached SDK locations on the host.

A new agnostic platform has been created:
PlatformRemoteGDBServer - this implements the platform using the GDB remote
protocol and uses the built in lldb_private::Host
static functions to implement many queries.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
e7fa4a9435eae3b83e1fb58283993284968b6777 16-Feb-2011 Stephen Wilson <wilsons@start.ca> Expose includes for the socket layer on all platforms.

This patch reverts a portion of r125199 to allow the tree to build again on
linux. The specific mingw issues that revision intended to address can be
sorted out at a later time.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
f29a08f9176c1a443942c08a999763e79b911f62 09-Feb-2011 Greg Clayton <gclayton@apple.com> Patch from Kirk Beitz to make things compile on MinGW minus the putenv part.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
ddff7cca4b3d2507706ed9011e6f0a503b984195 04-Feb-2011 Greg Clayton <gclayton@apple.com> Remove bzero use and replace with memset (patch from Kirk Beitz).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
242db729a2b6f77f873be012ac31b30bd819f951 03-Feb-2011 Caroline Tice <ctice@apple.com> Fix the ctr-D and end-of-file stuff.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
0d6e36a30fe3f205cdaf2d56af7378647219f75a 20-Dec-2010 Johnny Chen <johnny.chen@apple.com> Patch from Stephen Wilson:

POSIX does not define sockaddr_un.sun_len. Set only when required by
the platform.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
4877965d1ddbe480fcc9d1f1caf2ed629a1c9795 13-Dec-2010 Caroline Tice <ctice@apple.com> Revert a small but important part of the EOF handling code that Greg
missed in his previous revert.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
9ac497bc11512d221b3962e4f883eeac07db188a 02-Dec-2010 Caroline Tice <ctice@apple.com> Add proper EOF handling to Communication & Connection classes:

Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not. Update the
Connection read to return an EOF status when appropriate. Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
42bee0587010de0f101f0cfd74f9dc9e72cb1588 20-Nov-2010 Greg Clayton <gclayton@apple.com> Revert the End of file stuff that was added as it was causing read threads
to hang around and take a ton of CPU time. Caroline will fix this when she
gets back from vacation.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
c4f55fee15b66ea53da092ca50400ac5d8b0692d 19-Nov-2010 Caroline Tice <ctice@apple.com> Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
861efb3f6e225e45c45511d6da894633b36025a1 16-Nov-2010 Caroline Tice <ctice@apple.com> Make processes use InputReaders for their input. Move the process
ReadThread stuff into the main Process class (out of the Process Plugins).
This has the (intended) side effect of disabling the command line tool
from reading input/commands while the process is running (the input is
directed to the running process rather than to the command interpreter).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
e005f2ce03c489ebde9110678a29cbfe8488d5b4 06-Nov-2010 Greg Clayton <gclayton@apple.com> Modified all logging calls to hand out shared pointers to make sure we
don't crash if we disable logging when some code already has a copy of the
logger. Prior to this fix, logs were handed out as pointers and if they were
held onto while a log got disabled, then it could cause a crash. Now all logs
are handed out as shared pointers so this problem shouldn't happen anymore.
We are also using our new shared pointers that put the shared pointer count
and the object into the same allocation for a tad better performance.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
7abdb247d269848e61625a6630439d8d8c6faeda 29-Oct-2010 Caroline Tice <ctice@apple.com> Missed a file in my last commit.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
36f63a92bae332929e1a047b59ed6df651d8537f 19-Oct-2010 Greg Clayton <gclayton@apple.com> Stop the driver from handling SIGPIPE in case we communicate with stale
sockets so the driver doesn't just crash.

Added support for connecting to named sockets (unix IPC sockets) in
ConnectionFileDescriptor.

Modified the Host::LaunchInNewTerminal() for MacOSX to return the process
ID of the inferior process instead of the process ID of the Terminal.app. This
was done by modifying the "darwin-debug" executable to connect to lldb through
a named unix socket which is passed down as an argument. This allows a quick
handshake between "lldb" and "darwin-debug" so we can get the process ID
of the inferior and then attach by process ID and avoid attaching to the
inferior by process name since there could be more than one process with
that name. This still has possible race conditions, those will be fixed
in the near future. This fixes the SIGPIPE issues that were sometimes being
seen when task_for_pid was failing.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
f8e98a6e4560c632a9c0373abee247e747097845 23-Jul-2010 Greg Clayton <gclayton@apple.com> Warnings cleanup patch from Jean-Daniel Dupas.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
84cdc15005983e5244d665fa779e33c2b6fac95f 15-Jun-2010 Jim Ingham <jingham@apple.com> Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
057ef85b36f7c22395eb376584c3d40d382cc40e 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Add necessary includes. Remove unnecessary assignments to sin_len.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ConnectionFileDescriptor.cpp