Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1643] Struct parameters missing from dSYM in optimized code #44252

Open
swift-ci opened this issue May 30, 2016 · 2 comments
Open

[SR-1643] Struct parameters missing from dSYM in optimized code #44252

swift-ci opened this issue May 30, 2016 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself debug info Area → compiler → IRGen: Debug information emission

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-1643
Radar rdar://26559945
Original Reporter eladcon (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, DebugInfo
Assignee @adrian-prantl
Priority Medium

md5: cb64af5bc6213df71665eb255e267aea

Issue Description:

Hi,

When building a swift project with Release configuration, struct/array parameters are sometimes missing from the dSYM.

For example, this code:

public class Test {
public func TestArr(intParam: [Int]) {
}
}

Produces this output:

....
0x00000000: Compile Unit: length = 0x00000429 version = 0x0003 abbr_offset = 0x00000000 addr_size = 0x04 (next CU at 0x0000042d)

0x0000000b: TAG_compile_unit [1] *
AT_producer( "Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)" )
AT_language( DW_LANG_Swift )
AT_name( "/tmp/DsymTest/DsymTest/ViewController.swift" )
AT_stmt_list( 0x00000000 )
AT_comp_dir( "/private/tmp/DsymTest" )
AT_APPLE_optimized( 0x01 )
....
0x00000554: TAG_structure_type [25] *
AT_name( "Test" )
AT_declaration( 0x01 )
AT_APPLE_runtime_class( 0x1e )

0x0000055b: TAG_subprogram [43]
AT_low_pc( 0x0000a1f4 )
AT_high_pc( 0x0000a1f8 )
AT_frame_base( r7 )
AT_MIPS_linkage_name( "TFC8DsymTest4Test7TestArrfGSaSi_T" )
AT_name( "TestArr" )
AT_decl_file( "/private/tmp/com.apple.launchd.8t3BKDu7fZ/File.swift" )
AT_decl_line( 12 )
AT_type( {0x00000464} ( TtT ) )
AT_external( 0x01 )
AT_APPLE_optimized( 0x01 )
AT_APPLE_isa( 0x02 )

0x00000577: NULL

0x00000578: TAG_subprogram [26]
AT_MIPS_linkage_name( "_TMaC8DsymTest4Test" )
AT_artificial( 0x01 )
AT_external( 0x01 )
AT_APPLE_optimized( 0x01 )
AT_APPLE_isa( 0x02 )
AT_inline( DW_INL_inlined )
.......

@belkadan
Copy link
Contributor

@adrian-prantl, you had a dup of this, right?

@adrian-prantl
Copy link
Contributor

This only happens in optimized code.

Note that this is a deficiency in LLVM, not in the swift frontend. Here is the IR generated for this input:

; Function Attrs: nounwind
define void @TFC3out4Test7TestArrfT8intParamGSaSiT(%swift.bridge*, %C3out4Test* nocapture readnone) #1 35 {
entry:
tail call void @swift_bridgeObjectRelease(%swift.bridge* %0) #8, 45
tail call void @llvm.dbg.value(metadata %swift.bridge* %0, i64 0, metadata ![](46, metadata )47), 48
ret void, 49
}

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself debug info Area → compiler → IRGen: Debug information emission
Projects
None yet
Development

No branches or pull requests

3 participants