llvm-project/lldb
Todd Fiala 75f47c3a5d llgs: fixes to PTY/gdb-remote inferior stdout/stderr handling, logging addtions.
With this change, both local-process llgs and remote-target llgs stdout/stderr
handling from inferior work correctly.

Several log lines have been added around PTY and stdout/stderr redirection
logic on the lldb client side.

Regarding remote llgs execution, see the following:

With these changes, remote llgs with $O now works properly:

$ lldb
(lldb) platform select remote-linux
(lldb) target create ~/some/inferior/exe
(lldb) gdb-remote {some-target}:{port}
(lldb) run

The sequence above will correctly redirect stdout/stderr over gdb-remote $O,
as is needed for remote debugging.  That sequence assumes there is a lldb-gdbserver
exe running on the target with {some-host}:{port}.

You can replace the gdb-remote command with a '(lldb) platform connect
connect://{target-ip}:{target-port}'.  If you do this and have a
lldb-platform running on the remote end, it will go ahead and launch
llgs for lldb for each target instance that is run/attached.

For local debugging with llgs, the following sequence also works, and
uses local PTYs instead to avoid $O and extra gdb-remote messages:

$ lldb
(lldb) settings set platform.plugin.linux.use-llgs true
(lldb) target create ~/some/inferior/exe
(lldb) run

The above will run the inferior using llgs on the local host, and
will use PTYs rather than $O redirection.

This change also removes the logging that happened after the fork but
before the exec when llgs is launching a new inferior process.  Some
aspect of the file handling during that portion of code would not do
the right thing with log handling.  We might want to go back later
and have that communicate over a pipe from the child to parent to pass
along any messages that previously were logged in that section of code.

llvm-svn: 219578
2014-10-11 21:42:09 +00:00
..
docs Change the encoding of the Triple string exchanged across GDB-RSP 2014-08-01 05:12:23 +00:00
examples Improved the TreeItem delegate which simplifies making tree items: 2014-10-07 17:30:23 +00:00
gtest thread state coordinator: fixed bug in thread running state book-keeping. 2014-10-09 17:00:55 +00:00
include Add a IsInstrumentationRuntimePresent SB API 2014-10-11 01:59:32 +00:00
lib Fix the build after the recent plugin additions for 2014-10-11 00:38:55 +00:00
lldb.xcodeproj LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
lldb.xcworkspace Fixup gtest layout, add Linux ThreadStateCoordinator.cpp. 2014-09-25 19:25:07 +00:00
resources Bump the verison number in the xcode project files. 2014-08-21 23:27:02 +00:00
scripts Add a IsInstrumentationRuntimePresent SB API 2014-10-11 01:59:32 +00:00
source llgs: fixes to PTY/gdb-remote inferior stdout/stderr handling, logging addtions. 2014-10-11 21:42:09 +00:00
test LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
tools Rework the way we pass "run multiple command" options to the various API's that 2014-10-11 00:38:27 +00:00
utils LUI: Fix some issues causing crashes in the source view 2013-10-23 01:18:21 +00:00
www Add a (Python only) lldb.SBSyntheticValueProvider class to our API surface 2014-10-08 20:10:09 +00:00
.arcconfig Update .arcconfig to point to reviews.llvm.org 2014-05-20 21:24:59 +00:00
.clang-format Fix .clang-format file to adhere to LLDB 140 column limit. 2014-08-19 17:18:38 +00:00
.gitignore Update .gitignore for MacOSX 2014-08-14 20:19:57 +00:00
CMakeLists.txt build: fix cmake warning with newer CMake 2014-07-20 05:28:55 +00:00
INSTALL.txt Update INSTALL.txt to mention LLDB builds on Linux with GCC or Clang. 2013-02-21 22:37:18 +00:00
LICENSE.TXT
Makefile Remove the -Wno-unused-function option. We are clean 2014-09-09 07:49:15 +00:00