TransWikia.com

Append to environment variable in LLDB

Reverse Engineering Asked on April 9, 2021

It is relatively easy to set environment variables in LLDB, via

settings set target.env-vars DEBUG=1

However, I can’t seem to find a way to append to an environment variable. The following doesn’t work:

(lldb) settings set target.env-vars DEBUG=1
(lldb) settings set target.env-vars DEBUG=2$DEBUG
(lldb) settings show target.env-vars DEBUG
target.env-vars (dictionary of strings) =
  DEBUG=2$DEBUG

One Answer

Referencing variables with $ only works in the shell or if the program specifically supports it. You simply have to paste or type the old value manually.

Possibly you can use Python scripting to read and write the environment variables.

Answered by Igor Skochinsky on April 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP