Uploaded image for project: 'Swift'
  1. Swift
  2. SR-2273

Struct fields are not represented in Swift 3.0 DSYM.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      There is no field information in the struct information in DSYM, just property methods and total struct size. Field information is necessary for deducing struct layout when it is passed as a function parameter in register(s).

      Using one of the property methods (for instance, get()) seems problematic because of computed properties.

      Example:

      Code
      struct TestStruct31 {
      var float0: Float = 0;
      var double1: Double = 1;
      }

      Dwarfdump output:
      0x0001d442: TAG_structure_type [4] *
      AT_name( "TestStruct31" )
      AT_linkage_name( "_TtV8SwiftApp12TestStruct31" )
      AT_byte_size( 0x10 )
      AT_decl_line( 4 )
      AT_APPLE_runtime_class( 0x1e )

      0x0001d44f: TAG_subprogram [5] *
      AT_low_pc( 0x00166d50 )
      AT_high_pc( 0x00166d74 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31g6float0Sf" )
      AT_name( "float0.get" )
      AT_decl_line( 5 )
      AT_type(

      {0x0001f32b} ( Float ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d46a: TAG_formal_parameter [6]
      AT_location( sp+0 )
      AT_name( "self" )
      AT_decl_line( 5 )
      AT_type( {0x0001d442} ( TestStruct31 ) )
      AT_artificial( 0x01 )

      0x0001d479: NULL

      0x0001d47a: TAG_subprogram [5] *
      AT_low_pc( 0x00166d74 )
      AT_high_pc( 0x00166d94 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31s6float0Sf" )
      AT_name( "float0.set" )
      AT_decl_line( 5 )
      AT_type( {0x0001f383} ( TtT ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d495: TAG_formal_parameter [7]
      AT_location( sp+0 )
      AT_name( "value" )
      AT_decl_line( 5 )
      AT_type( {0x0001f32b}

      ( Float ) )

      0x0001d4a3: TAG_formal_parameter [6]
      AT_location( sp+4 )
      AT_name( "self" )
      AT_decl_line( 5 )
      AT_type(

      {0x0001f3a3} ( _TtRV8SwiftApp12TestStruct31 ) )
      AT_artificial( 0x01 )

      0x0001d4b2: NULL

      0x0001d4b3: TAG_subprogram [8]
      AT_low_pc( 0x00166d94 )
      AT_high_pc( 0x00166db4 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31m6float0Sf" )
      AT_name( "float0.materialize" )
      AT_type( {0x0001f38e} ( TtTBpGSqBp_ ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d4cc: TAG_subprogram [5] *
      AT_low_pc( 0x00166db4 )
      AT_high_pc( 0x00166dd8 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31g7double1Sd" )
      AT_name( "double1.get" )
      AT_decl_line( 6 )
      AT_type( {0x0001f336} ( Double ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d4e7: TAG_formal_parameter [6]
      AT_location( sp+0 )
      AT_name( "self" )
      AT_decl_line( 6 )
      AT_type( {0x0001d442} ( TestStruct31 ) )
      AT_artificial( 0x01 )

      0x0001d4f6: NULL

      0x0001d4f7: TAG_subprogram [5] *
      AT_low_pc( 0x00166dd8 )
      AT_high_pc( 0x00166e04 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31s7double1Sd" )
      AT_name( "double1.set" )
      AT_decl_line( 6 )
      AT_type( {0x0001f383} ( TtT ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d512: TAG_formal_parameter [7]
      AT_location( sp+0 )
      AT_name( "value" )
      AT_decl_line( 6 )
      AT_type( {0x0001f336} ( Double ) )

      0x0001d520: TAG_formal_parameter [6]
      AT_location( sp+8 )
      AT_name( "self" )
      AT_decl_line( 6 )
      AT_type( {0x0001f3a3}

      ( _TtRV8SwiftApp12TestStruct31 ) )
      AT_artificial( 0x01 )

      0x0001d52f: NULL

      0x0001d530: TAG_subprogram [8]
      AT_low_pc( 0x00166e04 )
      AT_high_pc( 0x00166e28 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "_TFV8SwiftApp12TestStruct31m7double1Sd" )
      AT_name( "double1.materialize" )
      AT_type(

      {0x0001f38e}

      ( TtTBpGSqBp_ ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d549: TAG_subprogram [9]
      AT_low_pc( 0x00166e28 )
      AT_high_pc( 0x00166e40 )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "TFV8SwiftApp12TestStruct31CfT6float0Sf7double1Sd_S0" )
      AT_name( "init" )
      AT_decl_line( 4 )
      AT_type(

      {0x0001d442} ( TestStruct31 ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d564: TAG_subprogram [5] *
      AT_low_pc( 0x00166e40 )
      AT_high_pc( 0x00166e7c )
      AT_frame_base( r7 )
      AT_MIPS_linkage_name( "TFV8SwiftApp12TestStruct31CfT_S0" )
      AT_name( "init" )
      AT_decl_line( 4 )
      AT_type( {0x0001d442}

      ( TestStruct31 ) )
      AT_external( 0x01 )
      AT_APPLE_isa( 0x02 )

      0x0001d57f: TAG_formal_parameter [6]
      AT_location( sp+0 )
      AT_name( "self" )
      AT_decl_line( 4 )
      AT_type(

      {0x0001d442}

      ( TestStruct31 ) )
      AT_artificial( 0x01 )

      0x0001d58e: NULL

      0x0001d58f: NULL

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                delkind David Elkind
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: