llvm-project/lldb/source
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
..
API Update LLDB to use LLVM's DynamicLibrary. 2014-08-27 20:15:09 +00:00
Breakpoint Fix typos. 2014-07-01 21:22:11 +00:00
Commands Make it clear in the help that "breakpoint command add" will act on the last set 2014-08-28 00:50:17 +00:00
Core lldb - towards AArch64 being recognised as platform architecture 2014-08-28 14:32:43 +00:00
DataFormatters Add __NSCFDictionary to the list of NSDictionary-like types for which we know to generate synthetic children 2014-08-27 01:10:27 +00:00
Expression Update for LLVM API change. 2014-08-27 20:09:08 +00:00
Host Ensure the Host wait4 thread is able to show pid in thread name. 2014-08-28 21:21:39 +00:00
Interpreter A quoted - is not the beginning of an option, and should not be completed as such. This was causing: 2014-08-27 22:06:58 +00:00
Plugins Add arbitrary command line flags to llgs/debugserver startup for local debugging. 2014-08-29 17:10:31 +00:00
Symbol Copy unwind plan instead of modifying it directly, so "image show-unwind" prints different plans for asynchronous and synchronous. 2014-08-25 23:09:40 +00:00
Target Add some logging around Process attaching and inferior exec handling. 2014-08-27 22:58:26 +00:00
Utility lldb - Register Context Linux ARM64 2014-08-29 16:01:35 +00:00
CMakeLists.txt Fix a CMake error when using CMake 3.0.1 2014-08-22 20:44:55 +00:00
Makefile Make lldb build with Makefiles on OS X. 2014-01-18 08:05:32 +00:00
lldb-log.cpp Fix typos. 2014-07-01 21:22:11 +00:00
lldb.cpp Initialize LLVM when LLDB is initialized, and 2014-08-23 00:47:22 +00:00