llvm-project/lldb
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
..
docs Change the encoding of the Triple string exchanged across GDB-RSP 2014-08-01 05:12:23 +00:00
examples Fix some typos: 2014-08-11 18:06:28 +00:00
include lldb - towards AArch64 being recognised as platform architecture 2014-08-28 14:32:43 +00:00
lib Still trying to fix the Make build. Link lldbHostPosix to liblldb 2014-08-15 23:27:37 +00:00
lldb.xcodeproj Update LLDB to use LLVM's DynamicLibrary. 2014-08-27 20:15:09 +00:00
lldb.xcworkspace Move the performance test cases into their own project. 2013-03-18 23:05:00 +00:00
resources Bump the verison number in the xcode project files. 2014-08-21 23:27:02 +00:00
scripts Make it clear that the load_addr property on SBAddress relies on lldb.target, 2014-08-27 22:05:14 +00:00
source Add arbitrary command line flags to llgs/debugserver startup for local debugging. 2014-08-29 17:10:31 +00:00
test Clean up after the multithreaded test case finishes. 2014-08-26 23:31:00 +00:00
tools llgs: remove all Initialize() calls except for Debugger::Initialize(). 2014-08-27 19:56:58 +00:00
utils LUI: Fix some issues causing crashes in the source view 2013-10-23 01:18:21 +00:00
www Fix some typos: 2014-08-11 18:06:28 +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 Add some missing defines that are already present in the cmake side. 2014-03-12 10:35:00 +00:00