什么环境变量控制dyld? [英] What environment variables control dyld?

查看:28
本文介绍了什么环境变量控制dyld?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一堆控制 dyld 启动的环境变量,其中一些对于调试性能问题非常有用.并非所有这些都被记录在案.

There are a bunch of environment variables that control dyld launch, several of them very useful for debugging performance problems. Not all of them are documented.

推荐答案

这些在 dyld 手册页中有解释(至少在 macOS 10.13 上)

These ones are explained in the dyld man page (at least on macOS 10.13)

DYLD_FRAMEWORK_PATH
DYLD_FALLBACK_FRAMEWORK_PATH
DYLD_VERSIONED_FRAMEWORK_PATH
DYLD_LIBRARY_PATH
DYLD_FALLBACK_LIBRARY_PATH
DYLD_VERSIONED_LIBRARY_PATH
DYLD_PRINT_TO_FILE
DYLD_SHARED_REGION
DYLD_INSERT_LIBRARIES
DYLD_FORCE_FLAT_NAMESPACE
DYLD_IMAGE_SUFFIX
DYLD_PRINT_OPTS
DYLD_PRINT_ENV
DYLD_PRINT_LIBRARIES
DYLD_BIND_AT_LAUNCH
DYLD_DISABLE_DOFS
DYLD_PRINT_APIS
DYLD_PRINT_BINDINGS
DYLD_PRINT_INITIALIZERS
DYLD_PRINT_REBASINGS
DYLD_PRINT_SEGMENTS
DYLD_PRINT_STATISTICS
DYLD_PRINT_DOFS
DYLD_PRINT_RPATHS
DYLD_SHARED_CACHE_DIR
DYLD_SHARED_CACHE_DONT_VALIDATE

这个记录在 man dyld 中,但没有列在顶部的列表中:

This one is documented in man dyld, but isn't listed in the list at the top:

DYLD_PRINT_STATISTICS_DETAILS

这些是未记录的:

DYLD_ROOT_PATH
DYLD_PATHS_ROOT
DYLD_DISABLE_PREFETCH
DYLD_PRINT_LIBRARIES_POST_LAUNCH
DYLD_NEW_LOCAL_SHARED_REGIONS
DYLD_NO_FIX_PREBINDING
DYLD_PREBIND_DEBUG
DYLD_PRINT_TO_STDERR
DYLD_PRINT_WEAK_BINDINGS
DYLD_PRINT_WARNINGS
DYLD_PRINT_CS_NOTIFICATIONS
DYLD_PRINT_INTERPOSING
DYLD_PRINT_CODE_SIGNATURES
DYLD_USE_CLOSURES
DYLD_IGNORE_PREBINDING
DYLD_SKIP_MAIN

DYLD_ROOT_PATHDYLD_PATHS_ROOT 似乎是同义词,允许您重置根"以搜索库/框架/等.这在 macOS/iPhoneSimulator 上可用,但在 iOS 上不可用.

DYLD_ROOT_PATH and DYLD_PATHS_ROOT appear to be synonyms and allow you to reset the "root" for searching for libraries/frameworks/etc. This is available on macOS/iPhoneSimulator but not iOS.

DYLD_DISABLE_PREFETCH 禁止预取 __DATA 和 __LINKEDIT 段的内容.

DYLD_DISABLE_PREFETCH disables the pre-fetching of the content of __DATA and __LINKEDIT segments.

DYLD_PRINT_LIBRARIES_POST_LAUNCH 与 DYLD_PRINT_LIBRARIES 相同,但在启动完成后立即打印.

DYLD_PRINT_LIBRARIES_POST_LAUNCH is the same as DYLD_PRINT_LIBRARIES but prints them right after launch has finished.

DYLD_NEW_LOCAL_SHARED_REGIONSDYLD_NO_FIX_PREBINDING 被忽略,不再做任何事情.

DYLD_NEW_LOCAL_SHARED_REGIONS and DYLD_NO_FIX_PREBINDING are ignored and don't do anything anymore.

DYLD_PREBIND_DEBUG 打印关于未使用预绑定原因的调试信息.

DYLD_PREBIND_DEBUG prints out debug information on why prebinding was not used.

DYLD_PRINT_TO_STDERR 仅适用于 iOS 并强制输出到 stderr(而不是 stdout)以帮助其显示在控制台日志中.

DYLD_PRINT_TO_STDERR only applies to iOS and forces output to stderr (instead of stdout) to help it show up on console logs.

DYLD_PRINT_WEAK_BINDINGS 打印关于弱绑定的调试信息.

DYLD_PRINT_WEAK_BINDINGS prints debug information on weak bindings.

DYLD_PRINT_WARNINGS 打印一堆警告(主要是关于闭包及其使用方式).

DYLD_PRINT_WARNINGS prints a bunch of warnings (mostly regards to closures and how they are being used).

DYLD_PRINT_CS_NOTIFICATIONS 打印有关核心符号的信息.

DYLD_PRINT_CS_NOTIFICATIONS prints information about the core symbolicator.

DYLD_PRINT_INTERPOSING 打印有关发生的插入的详细信息.

DYLD_PRINT_INTERPOSING prints details about interposes that occur.

DYLD_PRINT_CODE_SIGNATURES 打印有关代码签名的详细信息(特别是成功和失败).

DYLD_PRINT_CODE_SIGNATURES prints details about code signatures (specifically successes and failures).

DYLD_USE_CLOSURES 是 dyld3 功能,但似乎不适用于任何非内部人员(需要设置 CSR_ALLOW_APPLE_INTERNAL).

DYLD_USE_CLOSURES is a dyld3 feature, but doesn't appear to work for anybody non-internal (need CSR_ALLOW_APPLE_INTERNAL set).

DYLD_IGNORE_PREBINDING 具有三个值(all"、app"、nonsplit"),如果未提供值,则 nonsplit 为默认值.

DYLD_IGNORE_PREBINDING has three values ("all", "app", "nonsplit") with nonsplit being the default if a value is not supplied.

DYLD_SKIP_MAIN 是苹果独有的功能,用于测试 dyld(需要设置 CSR_ALLOW_APPLE_INTERNAL).

DYLD_SKIP_MAIN is an apple only feature used for testing dyld (need CSR_ALLOW_APPLE_INTERNAL set).

这篇关于什么环境变量控制dyld?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆