[Issue 18527] lldb: `frame variable` works with ldc2, not with dmd

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 19 12:34:20 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=18527

--- Comment #4 from Jacob Carlborg <doob at me.com> ---
Here's the output of `dwarfdump` for LDC:

main.o: file format Mach-O 64-bit x86-64

.debug_info contents:
0x00000000: Compile Unit: length = 0x000000ef version = 0x0004 abbr_offset =
0x0000 addr_size = 0x08 (next unit at 0x000000f3)

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer    ("LDC 1.20.0 (LLVM 9.0.1)")
              DW_AT_language    (DW_LANG_D)
              DW_AT_name        ("main.d")
              DW_AT_stmt_list   (0x00000000)
              DW_AT_comp_dir    ("~/development/d")
              DW_AT_APPLE_major_runtime_vers    (0x01)
              DW_AT_low_pc      (0x0000000000000000)
              DW_AT_high_pc     (0x000000000000006b)

0x0000002b:   DW_TAG_module
                DW_AT_name      ("main")

0x00000030:     DW_TAG_imported_module
                  DW_AT_import  (0x000000cd)

0x00000035:     DW_TAG_subprogram
                  DW_AT_low_pc  (0x0000000000000000)
                  DW_AT_high_pc (0x0000000000000016)
                  DW_AT_frame_base      (DW_OP_reg6 RBP)
                  DW_AT_linkage_name    ("_D4main3fooFiZv")
                  DW_AT_name    ("foo")
                  DW_AT_decl_file       ("~/development/d/main.d")
                  DW_AT_decl_line       (3)
                  DW_AT_external        (true)

0x0000004e:       DW_TAG_formal_parameter
                    DW_AT_location      (DW_OP_fbreg -4)
                    DW_AT_name  ("a")
                    DW_AT_decl_file     ("~/development/d/main.d")
                    DW_AT_decl_line     (3)
                    DW_AT_type  (0x000000d2 "int")

0x0000005c:       DW_TAG_variable
                    DW_AT_location      (DW_OP_fbreg -8)
                    DW_AT_name  ("b")
                    DW_AT_decl_file     ("~/development/d/main.d")
                    DW_AT_decl_line     (5)
                    DW_AT_type  (0x000000d2 "int")

0x0000006a:       DW_TAG_variable
                    DW_AT_location      (DW_OP_fbreg -12)
                    DW_AT_name  ("c")
                    DW_AT_decl_file     ("~/development/d/main.d")
                    DW_AT_decl_line     (6)
                    DW_AT_type  (0x000000d2 "int")

0x00000078:       NULL

0x00000079:     DW_TAG_subprogram
                  DW_AT_low_pc  (0x0000000000000020)
                  DW_AT_high_pc (0x0000000000000032)
                  DW_AT_frame_base      (DW_OP_reg6 RBP)
                  DW_AT_linkage_name    ("_Dmain")
                  DW_AT_name    ("D main")
                  DW_AT_decl_file       ("~/development/d/main.d")
                  DW_AT_decl_line       (11)
                  DW_AT_external        (true)

0x00000092:     DW_TAG_subprogram
                  DW_AT_low_pc  (0x0000000000000040)
                  DW_AT_high_pc (0x000000000000006b)
                  DW_AT_frame_base      (DW_OP_reg6 RBP)
                  DW_AT_linkage_name    ("main")
                  DW_AT_name    ("main")
                  DW_AT_decl_file      
("~/Downloads/ldc2-1.20.0-osx-x86_64/bin/../import/core/internal/entrypoint.d")
                  DW_AT_decl_line       (32)
                  DW_AT_type    (0x000000d2 "int")
                  DW_AT_external        (true)

0x000000af:       DW_TAG_formal_parameter
                    DW_AT_location      (DW_OP_fbreg -4)
                    DW_AT_name  ("argc")
                    DW_AT_decl_file    
("~/Downloads/ldc2-1.20.0-osx-x86_64/bin/../import/core/internal/entrypoint.d")
                    DW_AT_decl_line     (32)
                    DW_AT_type  (0x000000d2 "int")

0x000000bd:       DW_TAG_formal_parameter
                    DW_AT_location      (DW_OP_fbreg -16)
                    DW_AT_name  ("argv")
                    DW_AT_decl_file    
("~/Downloads/ldc2-1.20.0-osx-x86_64/bin/../import/core/internal/entrypoint.d")
                    DW_AT_decl_line     (32)
                    DW_AT_type  (0x000000d9 "char**")

0x000000cb:       NULL

0x000000cc:     NULL

0x000000cd:   DW_TAG_module
                DW_AT_name      ("object")

0x000000d2:   DW_TAG_base_type
                DW_AT_name      ("int")
                DW_AT_encoding  (DW_ATE_signed)
                DW_AT_byte_size (0x04)

0x000000d9:   DW_TAG_pointer_type
                DW_AT_type      (0x000000e2 "char*")
                DW_AT_name      ("char**")

0x000000e2:   DW_TAG_pointer_type
                DW_AT_type      (0x000000eb "char")
                DW_AT_name      ("char*")

0x000000eb:   DW_TAG_base_type
                DW_AT_name      ("char")
                DW_AT_encoding  (DW_ATE_UTF)
                DW_AT_byte_size (0x01)

0x000000f2:   NULL

--


More information about the Digitalmars-d-bugs mailing list