Remove duplicated code

We preivously had two copies of ::BytesAvailable with only trivial
differences between them, and fixes have been applied to only one of
them.

Instead of duplicating the whole function, hide the FD_SET differences
behind a macro.  This leaves only one small __APPLE__-specific #if
block, and fixes ^C on non-__APPLE__ platforms.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@210592 91177308-0d34-0410-b5e6-96231b3b80d8
Added gdb-remote test to verify M memory write.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@210594 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed gdb-remote M test length parameter, added overwrite to test.

Initial check-in provided a nibble count instead of byte count for
the memory to write.  Fixed that.

Enhanced test to check for overwrite past the expected range of
writing to verify the correct amount is written.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@210602 91177308-0d34-0410-b5e6-96231b3b80d8
Add gdb-remote P register write test.

Added test that attempts to write a value to each general
purpose register that is bit-flipped from the initial read
value.  It then reads it back to see if it takes.

Right now I just assert that at least one register bit flip
write succeeds.  I added a note that on the MacOSX x86_64
debugserver case, the only writes that succeed from the GPR
set are rax thru rdx, rdi, rsi and rbp.  The failures are E32
failure-at-write-attempt issues on the debugserver end.
I'll revisit this after implementing in the llgs linux-x86_64 branch.
The packet log looks good but I may have a subtle mistake in the code.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@210681 91177308-0d34-0410-b5e6-96231b3b80d8
Restore select limitations comment for non-Apple platforms



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