[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "system-wide" lldbinit file

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 15 04:48:19 PST 2022


labath created this revision.
labath added reviewers: JDevlieghere, jingham, clayborg, wallace.
Herald added a subscriber: mgorny.
labath requested review of this revision.
Herald added a project: LLDB.

This patch adds introduces a new kind of an lldbinit file. Unlike the
lldbinit in the home directory (useful for customizing lldb to the needs
of a particular user), or the cwd lldbinit file (useful for
project-specific settings), this file can be used to customize an entire
lldb installation to a particular environment.

The feature is enabled at build time, by setting the
LLDB_SYSTEM_INIT_PATH variable to a path to the lldbinit file. Lldb will
then load the file at startup, if it exists, and if automatic init
loading has not been disabled. Relative paths will be resolved (at
runtime) relative to the location of the lldb library (liblldb or
LLDB.framework).

The system-wide lldbinit file will be loaded first, before any
$HOME/.lldbinit and $CWD/.lldbinit files are processed, so that those
can override any system-wide settings.

More information can be found on the RFC thread at
https://discourse.llvm.org/t/rfc-system-wide-lldbinit/59933.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119831

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/include/lldb/API/SBCommandInterpreter.h
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Interpreter/CommandInterpreter.h
  lldb/source/API/SBCommandInterpreter.cpp
  lldb/source/API/SBDebugger.cpp
  lldb/source/Interpreter/CommandInterpreter.cpp
  lldb/tools/driver/Driver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119831.408819.patch
Type: text/x-patch
Size: 5477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220215/5214ec38/attachment.bin>


More information about the lldb-commits mailing list