[Lldb-commits] [PATCH] D90276: [lldb/utils] Add the lldb-env tool

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 27 17:42:36 PDT 2020


vsk created this revision.
vsk added reviewers: JDevlieghere, teemperor, mgorny.
Herald added a project: LLDB.
vsk requested review of this revision.

Introduce lldb-env, a tool that prints out the environment variables
needed to launch lldb.

Usually, no environment variables need to be set to launch lldb: in
these cases lldb-env prints nothing.

In a sanitized build, lldb-env prints out any mandatory `DYLD_*` options
needed to set up sanitizer interceptors early. The Darwin-specific logic
is just a starting point. The end goal would be to support launching
lldb on any platform via `export $(path/to/lldb-env); path/to/lldb`. The
current logic is taken/moved from test/API/lit.cfg. As a follow-up, we
could have lldb-dotest use lldb-env as well.

Testing: check-lldb with LLVM_USE_SANITIZER='Address'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90276

Files:
  lldb/test/API/lit.cfg.py
  lldb/test/CMakeLists.txt
  lldb/utils/lldb-dotest/CMakeLists.txt
  lldb/utils/lldb-dotest/lldb-env.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90276.301149.patch
Type: text/x-patch
Size: 4731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201028/4f9ffdee/attachment-0001.bin>


More information about the lldb-commits mailing list