Debugger: Force passing DYLD_.... environment variables to inferior

Apple's LLDB has changed behavior between 330.x and 340.x.

Newer versions seem to actively delete the DYLD_IMAGE_SUFFIX,
DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH environment variables
from the scripting environment.

Change-Id: I0b7bbdce0975e969b1dae5770fd9a99328f241be
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
hjk
2015-12-08 16:58:20 +01:00
committed by Eike Ziller
parent 5d1e894ef5
commit 58bec40246
2 changed files with 17 additions and 0 deletions

View File

@@ -337,6 +337,11 @@ void LldbEngine::setupInferior()
cmd2.arg("startmode", rp.startMode);
cmd2.arg("nativemixed", isNativeMixedActive());
// FIXME: separate Inferior and Debugger environments properly
cmd2.arg("dyldimagesuffix", rp.environment.value(_("DYLD_IMAGE_SUFFIX")));
cmd2.arg("dyldframeworkpath", rp.environment.value(_("DYLD_LIBRARY_PATH")));
cmd2.arg("dyldlibrarypath", rp.environment.value(_("DYLD_FRAMEWORK_PATH")));
QJsonArray processArgs;
foreach (const QString &arg, args.toUnixArgs())
processArgs.append(QLatin1String(arg.toUtf8().toHex()));