llvm-project/lldb/source/Plugins/Process
Todd Fiala 34ba426968 Add arbitrary command line flags to llgs/debugserver startup for local debugging.
This patch accepts environment variables of the form:
LLDB_DEBUGSERVER_EXTRA_ARG_n

where n starts with 1, and may continue nearly indefinitely (up through std::numeric_limits<uint32_t>::max()).

The code loops around, starting with 1, until it doesn't find one of the environment variables.  For each one it does find defined, it appends the environment variable's contents to the end of the debugserver/llgs startup command line issued when the stub is started for local debugging.

I am using this to add arbitrary startup commands to the llgs command line for turning on additional logging.  For example:

export LLDB_DEBUGSERVER_EXTRA_ARG_1="-c"
export LLDB_DEBUGSERVER_EXTRA_ARG_2="log enable -f /tmp/llgs_packets.log gdb-remote packets"
export LLDB_DEBUGSERVER_EXTRA_ARG_3="-c"
export LLDB_DEBUGSERVER_EXTRA_ARG_4="log enable -f /tmp/llgs_process.log lldb process"

llvm-svn: 216745
2014-08-29 17:10:31 +00:00
..
FreeBSD Fix Linux to respect ASLR settings when launching processes to debug locally and remotely. 2014-08-17 00:10:50 +00:00
Linux lldb - Register Context Linux ARM64 2014-08-29 16:01:35 +00:00
MacOSX-Kernel Fix ProcessKDP after Host/Socket addition 2014-08-06 21:18:13 +00:00
POSIX lldb - Register Context Linux ARM64 2014-08-29 16:01:35 +00:00
Utility lldb - Register Context Linux ARM64 2014-08-29 16:01:35 +00:00
Windows Refactor FileAction out of ProcessLaunchInfo. 2014-08-14 16:01:25 +00:00
elf-core Add lldb-gdbserver support for Linux x86_64. 2014-06-30 21:05:18 +00:00
gdb-remote Add arbitrary command line flags to llgs/debugserver startup for local debugging. 2014-08-29 17:10:31 +00:00
mach-core Don't have ProcessMachCore::CanDebug use the Target's arch when 2014-08-26 22:39:03 +00:00
CMakeLists.txt Teach LLDB about Windows processes. 2014-07-28 16:45:18 +00:00