[lldb-dev] Fridays llvm/clang/lldb & ObjectDescription

Carlo Kok ck at remobjects.com
Mon Jan 19 06:58:29 PST 2015


After updating lldb (and clang/llvm) to latest I noticed that I get back 
a different value for an NSString* than I used to, I used to get:


eTypeClassObjCObjectPointer
now I get :
eTypeClassObjCInterface


Also the object description property returns null because it doesn't 
consider eTypeClassObjCInterface to be a pointer. I looked at the 
generated debug info which looks fine (and the system lldb on osx works 
fine too):


0x00000159:             TAG_variable [7]
                          AT_location( fbreg +120 )
                          AT_name( "qwert" )
                          AT_decl_file( 
"c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                          AT_decl_line( 8 )
                          AT_type( {0x00000298} ( NSString* ) )


0x00000298:     TAG_pointer_type [9]
                  AT_type( {0x0000029d} ( NSString ) )

0x0000029d:     TAG_structure_type [10] *
                  AT_name( "NSString" )
                  AT_byte_size( 0x08 )
                  AT_APPLE_runtime_class( 0x10 )

0x000002a4:         TAG_inheritance [11]
                      AT_type( {0x000002ab} ( NSObject ) )
                      AT_data_member_location( 0x00 )

0x000002aa:         NULL

Am i missing something obvious, or is there something broken in lldb?

-- 
Carlo Kok
-------------- next part --------------
.debug_info contents:

0x00000000: Compile Unit: length = 0x0000031c  version = 0x0003  abbr_offset = 0x00000000  addr_size = 0x08  (next CU at 0x00000320)

0x0000000b: TAG_compile_unit [1] *
             AT_producer( "RemObjects Nougat (LLVM) 7.0.0.142" )
             AT_language( DW_LANG_ObjC )
             AT_name( "issuedebugsilver.oxygene" )
             AT_stmt_list( 0x00000000 )
             AT_comp_dir( "c:\projects\oxygene\testcases\work" )
             AT_APPLE_major_runtime_vers( 0x02 )
             AT_low_pc( 0x0000000000000000 )
             AT_ranges( 0x00000000
                [0x0000000000000000 - 0x00000000000001d8)
                [0x0000000000000210 - 0x00000000000006fe)
                [0x0000000000000bb0 - 0x0000000000000caf)
                 End )

0x0000002b:     TAG_subprogram [2] *
                 AT_low_pc( 0x0000000000000000 )
                 AT_high_pc( 0x00000000000000b4 )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test2 value]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 2 )
                 AT_type( {0x00000298} ( NSString* ) )
                 AT_external( 0x01 )

0x0000004a:         TAG_formal_parameter [3]
                     AT_location( fbreg +64 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 2 )
                     AT_type( {0x000002c7} ( test2* ) )

0x00000059:         TAG_formal_parameter [4]
                     AT_location( 0x00000000
                        0x0000000000000000 - 0x0000000000000038: rsi
                        0x0000000000000038 - 0x00000000000000b4: rsp+40 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 2 )
                     AT_type( {0x000002f6} ( * ) )

0x00000068:         NULL

0x00000069:     TAG_subprogram [5] *
                 AT_low_pc( 0x00000000000000c0 )
                 AT_high_pc( 0x0000000000000102 )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test2 setValue:]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 2 )
                 AT_external( 0x01 )

0x00000084:         TAG_formal_parameter [3]
                     AT_location( fbreg +32 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 2 )
                     AT_type( {0x000002c7} ( test2* ) )

0x00000092:         TAG_formal_parameter [3]
                     AT_location( fbreg +24 )
                     AT_name( "value" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 2 )
                     AT_type( {0x00000298} ( NSString* ) )

0x000000a0:         TAG_formal_parameter [4]
                     AT_location( 0x00000037
                        0x00000000000000c0 - 0x00000000000000f1: rsi
                        0x00000000000000f1 - 0x0000000000000102: rsp+8 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 2 )
                     AT_type( {0x000002f6} ( * ) )

0x000000af:         NULL

0x000000b0:     TAG_subprogram [2] *
                 AT_low_pc( 0x0000000000000110 )
                 AT_high_pc( 0x00000000000001d8 )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test2 .cxx_construct]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 1 )
                 AT_type( {0x000002c2} ( id ) )
                 AT_external( 0x01 )

0x000000cf:         TAG_formal_parameter [3]
                     AT_location( fbreg +80 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 1 )
                     AT_type( {0x000002c7} ( test2* ) )

0x000000de:         TAG_formal_parameter [4]
                     AT_location( 0x0000006e
                        0x0000000000000110 - 0x0000000000000143: rsi
                        0x0000000000000143 - 0x00000000000001d8: rsp+56 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 1 )
                     AT_type( {0x000002f6} ( * ) )

0x000000ed:         TAG_lexical_block [6] *
                     AT_low_pc( 0x0000000000000120 )
                     AT_high_pc( 0x0000000000000179 )

0x000000fe:             TAG_variable [7]
                         AT_location( fbreg +64 )
                         AT_name( "Result" )
                         AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                         AT_decl_line( 1 )
                         AT_type( {0x000002c2} ( id ) )

0x0000010d:             NULL

0x0000010e:         NULL

0x0000010f:     TAG_subprogram [5] *
                 AT_low_pc( 0x0000000000000210 )
                 AT_high_pc( 0x000000000000046c )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test testit]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 8 )
                 AT_external( 0x01 )

0x0000012a:         TAG_formal_parameter [3]
                     AT_location( fbreg +136 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 8 )
                     AT_type( {0x000002f7} ( test* ) )

0x00000139:         TAG_formal_parameter [4]
                     AT_location( 0x000000a5
                        0x0000000000000210 - 0x000000000000026a: rsi
                        0x000000000000026a - 0x0000000000000272: rsp+104 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 8 )
                     AT_type( {0x000002f6} ( * ) )

0x00000148:         TAG_lexical_block [6] *
                     AT_low_pc( 0x000000000000024c )
                     AT_high_pc( 0x0000000000000447 )

0x00000159:             TAG_variable [7]
                         AT_location( fbreg +120 )
                         AT_name( "qwert" )
                         AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                         AT_decl_line( 8 )
                         AT_type( {0x00000298} ( NSString* ) )

0x00000168:             NULL

0x00000169:         NULL

0x0000016a:     TAG_subprogram [2] *
                 AT_low_pc( 0x0000000000000470 )
                 AT_high_pc( 0x0000000000000524 )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test inst]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 7 )
                 AT_type( {0x000002c7} ( test2* ) )
                 AT_external( 0x01 )

0x00000189:         TAG_formal_parameter [3]
                     AT_location( fbreg +64 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 7 )
                     AT_type( {0x000002f7} ( test* ) )

0x00000198:         TAG_formal_parameter [4]
                     AT_location( 0x000000dd
                        0x0000000000000470 - 0x00000000000004a8: rsi
                        0x00000000000004a8 - 0x0000000000000524: rsp+40 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 7 )
                     AT_type( {0x000002f6} ( * ) )

0x000001a7:         NULL

0x000001a8:     TAG_subprogram [5] *
                 AT_low_pc( 0x0000000000000530 )
                 AT_high_pc( 0x0000000000000572 )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test setInst:]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 7 )
                 AT_external( 0x01 )

0x000001c3:         TAG_formal_parameter [3]
                     AT_location( fbreg +32 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 7 )
                     AT_type( {0x000002f7} ( test* ) )

0x000001d1:         TAG_formal_parameter [3]
                     AT_location( fbreg +24 )
                     AT_name( "value" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 7 )
                     AT_type( {0x000002c7} ( test2* ) )

0x000001df:         TAG_formal_parameter [4]
                     AT_location( 0x00000114
                        0x0000000000000530 - 0x0000000000000561: rsi
                        0x0000000000000561 - 0x0000000000000572: rsp+8 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 7 )
                     AT_type( {0x000002f6} ( * ) )

0x000001ee:         NULL

0x000001ef:     TAG_subprogram [2] *
                 AT_low_pc( 0x0000000000000580 )
                 AT_high_pc( 0x00000000000006fe )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "-[test .cxx_construct]" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 6 )
                 AT_type( {0x000002c2} ( id ) )
                 AT_external( 0x01 )

0x0000020e:         TAG_formal_parameter [3]
                     AT_location( fbreg +88 )
                     AT_name( "self" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 6 )
                     AT_type( {0x000002f7} ( test* ) )

0x0000021d:         TAG_formal_parameter [4]
                     AT_location( 0x0000014b
                        0x0000000000000580 - 0x00000000000005c5: rsi
                        0x00000000000005c5 - 0x00000000000005cd: rsp+56 )
                     AT_name( "_cmd" )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 6 )
                     AT_type( {0x000002f6} ( * ) )

0x0000022c:         TAG_lexical_block [6] *
                     AT_low_pc( 0x0000000000000589 )
                     AT_high_pc( 0x00000000000006a8 )

0x0000023d:             TAG_variable [7]
                         AT_location( fbreg +72 )
                         AT_name( "Result" )
                         AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                         AT_decl_line( 6 )
                         AT_type( {0x000002c2} ( id ) )

0x0000024c:             NULL

0x0000024d:         NULL

0x0000024e:     TAG_subprogram [2] *
                 AT_low_pc( 0x0000000000000bb0 )
                 AT_high_pc( 0x0000000000000caf )
                 AT_APPLE_omit_frame_ptr( 0x01 )
                 AT_frame_base( rsp )
                 AT_name( "main$" )
                 AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                 AT_decl_line( 14 )
                 AT_type( {0x000002e6} ( Integer ) )
                 AT_external( 0x01 )

0x0000026d:         TAG_formal_parameter [8]
                     AT_location( fbreg +40 )
                     AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                     AT_decl_line( 14 )
                     AT_type( {0x00000316} ( array of Foundation.NSString ) )

0x00000277:         TAG_lexical_block [6] *
                     AT_low_pc( 0x0000000000000bca )
                     AT_high_pc( 0x0000000000000caf )

0x00000288:             TAG_variable [7]
                         AT_location( fbreg +32 )
                         AT_name( "Result" )
                         AT_decl_file( "c:\projects\oxygene\testcases\work/issuedebugsilver_1.pas" )
                         AT_decl_line( 14 )
                         AT_type( {0x000002e6} ( Integer ) )

0x00000296:             NULL

0x00000297:         NULL

0x00000298:     TAG_pointer_type [9]
                 AT_type( {0x0000029d} ( NSString ) )

0x0000029d:     TAG_structure_type [10] *
                 AT_name( "NSString" )
                 AT_byte_size( 0x08 )
                 AT_APPLE_runtime_class( 0x10 )

0x000002a4:         TAG_inheritance [11]
                     AT_type( {0x000002ab} ( NSObject ) )
                     AT_data_member_location( 0x00 )

0x000002aa:         NULL

0x000002ab:     TAG_structure_type [10] *
                 AT_name( "NSObject" )
                 AT_byte_size( 0x08 )
                 AT_APPLE_runtime_class( 0x10 )

0x000002b2:         TAG_member [12]
                     AT_name( "isa" )
                     AT_type( {0x000002bd} ( Class ) )
                     AT_data_member_location( 0x00 )

0x000002bc:         NULL

0x000002bd:     TAG_pointer_type [13]
                 AT_name( "Class" )

0x000002c2:     TAG_pointer_type [13]
                 AT_name( "id" )

0x000002c7:     TAG_pointer_type [9]
                 AT_type( {0x000002cc} ( test2 ) )

0x000002cc:     TAG_structure_type [14] *
                 AT_APPLE_objc_complete_type( 0x01 )
                 AT_name( "test2" )
                 AT_byte_size( 0x10 )
                 AT_APPLE_runtime_class( 0x10 )

0x000002d4:         TAG_inheritance [11]
                     AT_type( {0x000002ab} ( NSObject ) )
                     AT_data_member_location( 0x00 )
	
0x000002da:         TAG_member [15]
                     AT_name( "@p_value" )
                     AT_type( {0x00000298} ( NSString* ) )
                     AT_data_member_location( 0x00 )
                     AT_accessibility( DW_ACCESS_private )

0x000002e5:         NULL

0x000002e6:     TAG_typedef [16]
                 AT_type( {0x000002ef} ( Integer ) )
                 AT_name( "Integer" )

0x000002ef:     TAG_base_type [17]
                 AT_name( "Integer" )
                 AT_encoding( DW_ATE_signed )
                 AT_byte_size( 0x04 )

0x000002f6:     TAG_pointer_type [18]

0x000002f7:     TAG_pointer_type [9]
                 AT_type( {0x000002fc} ( test ) )

0x000002fc:     TAG_structure_type [14] *
                 AT_APPLE_objc_complete_type( 0x01 )
                 AT_name( "test" )
                 AT_byte_size( 0x10 )
                 AT_APPLE_runtime_class( 0x10 )

0x00000304:         TAG_inheritance [11]
                     AT_type( {0x000002ab} ( NSObject ) )
                     AT_data_member_location( 0x00 )

0x0000030a:         TAG_member [15]
                     AT_name( "@p_inst" )
                     AT_type( {0x000002c7} ( test2* ) )
                     AT_data_member_location( 0x00 )
                     AT_accessibility( DW_ACCESS_private )

0x00000315:         NULL

0x00000316:     TAG_pointer_type [19]
                 AT_type( {0x00000298} ( NSString* ) )
                 AT_name( "array of Foundation.NSString" )

0x0000031f:     NULL
Carlos-Mac-mini:side ck$


More information about the lldb-dev mailing list