llvm-project/lldb/source/Plugins
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
..
ABI RegisterContextLLDB::InitializeNonZerothFrame had a bit of code to 2014-09-02 23:04:01 +00:00
Disassembler Add a new disassembly-format specification so that the disassembler 2014-10-10 23:07:36 +00:00
DynamicLoader Update assertion in DYLDRendezvous. 2014-10-10 17:47:00 +00:00
Instruction Update lldb to track recent Triple arm64 enum removal and collapse into aarch64. 2014-07-23 14:37:35 +00:00
InstrumentationRuntime LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
JITLoader Fix JITLoaderGDB for 64-bit host and 32-bit target 2014-09-15 19:55:27 +00:00
LanguageRuntime When parsing ObjC types from encoded strings (and disallowing any-type), the ^? combination gets resolved to no type, while we could resolve it to void* 2014-10-10 22:45:38 +00:00
MemoryHistory Add ASan history threads into process_sp->GetExtendedThreadList, so they don't get freed too early 2014-09-23 18:20:24 +00:00
ObjectContainer Fix typos. 2014-07-08 18:05:41 +00:00
ObjectFile Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sections 2014-09-29 08:02:24 +00:00
OperatingSystem Fixed deadlocks that could occur when using python for breakpoints, operating system plugins, and other async python usage. 2014-02-13 23:34:38 +00:00
Platform Enable local llgs debugging on Linux when the use-llgs-for-local setting is enabled. 2014-10-10 00:09:16 +00:00
Process llgs: fixes to PTY/gdb-remote inferior stdout/stderr handling, logging addtions. 2014-10-11 21:42:09 +00:00
SymbolFile dwarf: add dwarf v4 maximum_operations_per_instruction to DWARFDebugLine. 2014-09-29 23:11:09 +00:00
SymbolVendor Remove commented includes 2014-02-02 14:06:07 +00:00
SystemRuntime Change SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes to use the 2014-09-12 00:09:04 +00:00
UnwindAssembly Add a new disassembly-format specification so that the disassembler 2014-10-10 23:07:36 +00:00
CMakeLists.txt Fix cmake build for PluginInstrumentationRuntimeAddressSanitizer. 2014-10-11 20:11:18 +00:00
Makefile Fix the build after the recent plugin additions for 2014-10-11 00:38:55 +00:00