dwarfdump

编程入门 行业动态 更新时间:2024-10-23 13:35:07
dwarfdump - 调试版本没有符号?(dwarfdump - Debug Build Has No Symbols?)

我已经为iphoneos和iphonesimulator构建了我的项目,包括调试和发布。 当我在调试版本上运行dwarfdump时,报告为空。 当我在发布版本DSYM上运行它时,它会报告所有符号。

请参阅下面的输出(我只抓住了DSYM输出的第一部分)。

为什么调试版本为空?


文件:Debug-iphoneos / VerticonsToolbox.framework / VerticonsToolbox(arm64)

.debug_info内容:<EMPTY>


文件:Debug-iphonesimulator / VerticonsToolbox.framework / VerticonsToolbox(x86_64)

.debug_info内容:<EMPTY>


文件:Release-iphoneos / VerticonsToolbox.framework.dSYM / Contents / Resources / DWARF / VerticonsToolbox(armv7)

.debug_info内容:

0x00000000:编译单位:长度= 0x000013ad版本= 0x0003 abbr_offset = 0x00000000 addr_size = 0x04(下一个CU位于0x000013b1)

0x0000000b:TAG_compile_unit [1] * AT_producer(“Apple Swift版本3.0.2(swiftlang-800.0.63 clang-800.0.42.1)”)AT_language(DW_LANG_Swift)AT_name(“/ Users / Robert / Development / iOS / VerticonsToolbox / VerticonsToolbox / UI / Application.swift“)AT_stmt_list(0x00000000)AT_comp_dir(”/ Users / Robert / Development / iOS / VerticonsToolbox“)


文件:Release-iphonesimulator / VerticonsToolbox.framework.dSYM / Contents / Resources / DWARF / VerticonsToolbox(i386)

.debug_info内容:

0x00000000:编译单位:长度= 0x00001370版本= 0x0003 abbr_offset = 0x00000000 addr_size = 0x04(下一个CU位于0x00001374)

0x0000000b:TAG_compile_unit [1] * AT_producer(“Apple Swift版本3.0.2(swiftlang-800.0.63 clang-800.0.42.1)”)AT_language(DW_LANG_Swift)AT_name(“/ Users / Robert / Development / iOS / VerticonsToolbox / VerticonsToolbox / UI / Application.swift“)AT_stmt_list(0x00000000)AT_comp_dir(”/ Users / Robert / Development / iOS / VerticonsToolbox“)AT_APPLE_optimized(0x01)

I have built my project for iphoneos and iphonesimulator, both debug and release. When I run dwarfdump on the debug builds is reports empty. When I run it on the release build DSYMs it report all of the symbols.

See the output below (I only grabbed the first part of the DSYM output).

Why are the debug build empty?


File: Debug-iphoneos/VerticonsToolbox.framework/VerticonsToolbox (arm64)

.debug_info contents: < EMPTY >


File: Debug-iphonesimulator/VerticonsToolbox.framework/VerticonsToolbox (x86_64)

.debug_info contents: < EMPTY >


File: Release-iphoneos/VerticonsToolbox.framework.dSYM/Contents/Resources/DWARF/VerticonsToolbox (armv7)

.debug_info contents:

0x00000000: Compile Unit: length = 0x000013ad version = 0x0003 abbr_offset = 0x00000000 addr_size = 0x04 (next CU at 0x000013b1)

0x0000000b: TAG_compile_unit [1] * AT_producer( "Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)" ) AT_language( DW_LANG_Swift ) AT_name( "/Users/Robert/Development/iOS/VerticonsToolbox/VerticonsToolbox/UI/Application.swift" ) AT_stmt_list( 0x00000000 ) AT_comp_dir( "/Users/Robert/Development/iOS/VerticonsToolbox" )


File: Release-iphonesimulator/VerticonsToolbox.framework.dSYM/Contents/Resources/DWARF/VerticonsToolbox (i386)

.debug_info contents:

0x00000000: Compile Unit: length = 0x00001370 version = 0x0003 abbr_offset = 0x00000000 addr_size = 0x04 (next CU at 0x00001374)

0x0000000b: TAG_compile_unit [1] * AT_producer( "Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)" ) AT_language( DW_LANG_Swift ) AT_name( "/Users/Robert/Development/iOS/VerticonsToolbox/VerticonsToolbox/UI/Application.swift" ) AT_stmt_list( 0x00000000 ) AT_comp_dir( "/Users/Robert/Development/iOS/VerticonsToolbox" ) AT_APPLE_optimized( 0x01 )

最满意答案

在macOS,iOS,tvOS,watchOS上,当你进行“矮人”样式构建时(参见你的Xcode项目的构建设置),调试信息在.o文件中,而不是链接的可执行文件。 当您运行dsymutil或选择“dwarf + dSYM”样式构建设置时,会创建一个.dSYM包,其中.o文件中的所有调试信息都收集到一个包/二进制文件中。

On macOS, iOS, tvOS, watchOS, when you do a "dwarf" style build (see your Xcode project's build settings), the debug information is in the .o files, not the linked executable. When you run dsymutil or you select a "dwarf + dSYM" style build setting, a .dSYM bundle is created with all of the debug information in the .o files collected into a single bundle / binary.

更多推荐

本文发布于:2023-08-07 09:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1463792.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:dwarfdump

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!