[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:33:51 UTC 2020


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

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

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

.debug_info contents:
0x00000000: Compile Unit: length = 0x00000151 version = 0x0003 abbr_offset =
0x0000 addr_size = 0x08 (next unit at 0x00000155)

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer    ("Digital Mars D v2.090.1")
              DW_AT_language    (DW_LANG_D)
              DW_AT_name        ("main.d")
              DW_AT_comp_dir    ("~/development/d")
              DW_AT_low_pc      (0x0000000000000000)
              DW_AT_entry_pc    (0x0000000000000000)
              DW_AT_ranges      (0x00000000
                 [0x0000000000000538, 0x0000000000000538))
              DW_AT_stmt_list   (0x00000000)

0x0000005e:   DW_TAG_module
                DW_AT_name      ("main")

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

0x0000006b:   DW_TAG_subprogram
                DW_AT_sibling   (0x000000c2)
                DW_AT_name      ("main.foo")
                DW_AT_MIPS_linkage_name ("_D4main3fooFiZv")
                DW_AT_decl_file ("~/development/d/main.d")
                DW_AT_decl_line (3)
                DW_AT_low_pc    (0x0000000000000538)
                DW_AT_high_pc   (0x0000000000000538)
                DW_AT_frame_base        (0x00000000
                   [0x0000000000000538,  0x0000000000000538): DW_OP_breg7 RSP+8
                   [0x0000000000000538,  0x0000000000000538): DW_OP_breg7
RSP+16
                   [0x0000000000000538,  0x0000000000000538): DW_OP_breg6
RBP+16)

0x000000a0:     DW_TAG_formal_parameter
                  DW_AT_name    ("a")
                  DW_AT_type    (0x00000064 "int")
                  DW_AT_artificial      (0x00)
                  DW_AT_location        (DW_OP_fbreg -24)

0x000000ab:     DW_TAG_variable
                  DW_AT_name    ("b")
                  DW_AT_type    (0x00000064 "int")
                  DW_AT_artificial      (0x00)
                  DW_AT_location        (DW_OP_fbreg -32)

0x000000b6:     DW_TAG_variable
                  DW_AT_name    ("c")
                  DW_AT_type    (0x00000064 "int")
                  DW_AT_artificial      (0x00)
                  DW_AT_location        (DW_OP_fbreg -28)

0x000000c1:     NULL

0x000000c2:   DW_TAG_subprogram
                DW_AT_name      ("D main")
                DW_AT_MIPS_linkage_name ("_Dmain")
                DW_AT_decl_file ("~/development/d/main.d")
                DW_AT_decl_line (11)
                DW_AT_external  (0x01)
                DW_AT_low_pc    (0x0000000000000000)
                DW_AT_high_pc   (0x0000000000000000)
                DW_AT_frame_base        (0x0000004c)

0x000000e9:   DW_TAG_base_type
                DW_AT_name      ("char")
                DW_AT_byte_size (0x01)
                DW_AT_encoding  (DW_ATE_unsigned_char)

0x000000f1:   DW_TAG_pointer_type
                DW_AT_type      (0x000000e9 "char")

0x000000f6:   DW_TAG_pointer_type
                DW_AT_type      (0x000000f1 "char*")

0x000000fb:   DW_TAG_subprogram
                DW_AT_sibling   (0x00000154)
                DW_AT_name      ("main._d_cmain!().main")
                DW_AT_MIPS_linkage_name ("main")
                DW_AT_decl_file
("~/.dvm/compilers/dmd-2.090.1/osx/bin/../../src/druntime/import/core/internal/entrypoint.d")
                DW_AT_decl_line (32)
                DW_AT_type      (0x00000064 "int")
                DW_AT_external  (0x01)
                DW_AT_low_pc    (0x0000000000000000)
                DW_AT_high_pc   (0x0000000000000000)
                DW_AT_frame_base        (0x00000098)

0x00000137:     DW_TAG_formal_parameter
                  DW_AT_name    ("argc")
                  DW_AT_type    (0x00000064 "int")
                  DW_AT_artificial      (0x00)
                  DW_AT_location        (DW_OP_fbreg -32)

0x00000145:     DW_TAG_formal_parameter
                  DW_AT_name    ("argv")
                  DW_AT_type    (0x000000f6 "char**")
                  DW_AT_artificial      (0x00)
                  DW_AT_location        (DW_OP_fbreg -24)

0x00000153:     NULL

0x00000154:   NULL

--


More information about the Digitalmars-d-bugs mailing list