Mac: Update symbol table generation for compatibility with the atos utility supplied with Xcode 10

This commit is contained in:
Charlie Fenton 2019-01-31 06:10:02 -08:00
parent 2fb6d2ad35
commit c4d9ed0a33
2 changed files with 22 additions and 16 deletions

View File

@ -32,8 +32,21 @@
* http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
*
* To convert addresses to correct symbols, use the atos command-line tool:
* atos -o path/to/executable/with/symbols address
* Note: if address 1a23 is hex, use 0x1a23.
* * If the .dSYM file is not in the same directory as the executable, put
* a copy of the .dSYM file in that directory.
* atos -o <binary-image-file> -l <load-address>
* * <binary-image-file> must be the path to the binary executable; for
* example: "/Applications/BOINCManager.app/Conents/MacOS/BOINCManager"
* * The load address of the binary image can be found in the
* "Binary Images Description:" section of the backtrace. If the backtrace
* contains the following two lines:
* Binary Images Description:
* 0x10ebd9000 - 0x10f360fff /Applications/BOINCManager.app/Contents/MacOS/BOINCManager
* then <load-address> would be 0x10ebd9000
* * You can then enter addresses from the backtrace one line at a time to
* get their corresponding symbols.
* * Note: if an address 1a23 is hex, use 0x1a23.
* * For more information on using atos, see the atos man page.
*
* To demangle mangled C++ symbols, use the c++filt command-line tool.
* You may need to prefix C++ symbols with an additonal underscore before

View File

@ -2724,11 +2724,11 @@
"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager",
);
outputPaths = (
"${BUILT_PRODUCTS_DIR}/SymbolTables/sgBOINCManager_x86_64",
"${BUILT_PRODUCTS_DIR}/SymbolTables/sgBOINCManager.dSYM",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\n mkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n if [ \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\" ]; then\n ## echo \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager is newer than ${TARGET_BUILD_DIR}/SymbolTables/BOINCManager_x86_64\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_ppc\"\n cp -fp \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\"\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\"\n strip \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\"\n fi\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\nfi\n";
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\n mkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n if [ \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager.dSYM\" ]; then\n ## echo \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager is newer than ${TARGET_BUILD_DIR}/SymbolTables/BOINCManager.dSYM\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_ppc\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager.dSYM\"\n cp -fp \"${BUILT_PRODUCTS_DIR}/BOINCManager.app.dSYM\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager.app.dSYM\"\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager.app.dSYM\"\n strip \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\"\n fi\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\nfi\n\n";
};
DD7355180D9110AE0006A9D1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -2739,11 +2739,11 @@
"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
);
outputPaths = (
"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386",
"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\n mkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n if [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\" ]; then\n ## echo \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} is newer than ${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_ppc\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\n strip \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\"\n fi\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\n\nfi\n";
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\n mkdir -p \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n if [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\" ]; then\n ## echo \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} is newer than ${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_i386\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_ppc\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\n rm -f \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\"\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\"\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\"\n## strip \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\"\n fi\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\n\nfi\n\n";
};
DD73551E0D9111150006A9D1 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -2754,11 +2754,10 @@
"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
);
outputPaths = (
"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64\"\nfi\n";
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}.dSYM\"\nfi\n";
};
DD81C827144D90FC000BE61A /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -2823,11 +2822,11 @@
"${BUILT_PRODUCTS_DIR}/$PRODUCT_NAME",
);
outputPaths = (
"${BUILT_PRODUCTS_DIR}/SymbolTables/${PRODUCT_NAME}_x86_64",
"",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_x86_64\"\nfi\n";
shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n touch \"${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager.app.dSYM\"\nfi\n";
};
DDF9EC07144EB255005D6144 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -3654,7 +3653,6 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
GCC_PFE_FILE_C_DIALECTS = "c++";
@ -3711,7 +3709,6 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
GCC_PFE_FILE_C_DIALECTS = "c++";
@ -3800,7 +3797,6 @@
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
@ -3860,7 +3856,6 @@
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
@ -4093,7 +4088,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
HEADER_SEARCH_PATHS = (
"../../curl-7.58.0/include",
@ -4260,7 +4254,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = YES;
HEADER_SEARCH_PATHS = (
"../../curl-7.58.0/include",