Page MenuHomePhabricator

debug-infoProject
ActivePublic

Recent Activity

Thu, Jun 17

StephenTozer added a reverting change for D104105: [DebugInfo] Prevent non-determinism when updating DIArgList users of a value: rGe8991caea869: Revert "[DebugInfo] Prevent non-determinism when updating DIArgList users of a….
Thu, Jun 17, 7:21 AM · Restricted Project, debug-info
StephenTozer closed D104105: [DebugInfo] Prevent non-determinism when updating DIArgList users of a value.
Thu, Jun 17, 7:09 AM · Restricted Project, debug-info

Wed, Jun 16

dblaikie added a comment to D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.

There is no CPlusPlus03 in LangOptions, so it is better not to merge DW_LANG_C_plus_plus_03 support with D99250.

Oh - I see, c++03 is defined in LangStandards.def an alias for c++98, as the former essentially consists of bugfixes for the latter. This loosely suggests to me that C++03 implementations are (likely to be / mostly?) conformant to C++98, but that C++98 implementations may not be fully conformant to C++03. Given this alias, it doesn't seem at all clear to me which of DW_LANG_C_plus_plus_98 and DW_LANG_C_plus_plus_03 would be the better choice, if both C++98 and C++03 must share a language tag... but I presume this has been discussed before. (It also doesn't seem clear whether it would be better to model "c++98" as an alias for "c++03".)

Yes, we don't have DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 in clang for now. I guess this is because clang does not support DWARF 6. DWARF 6 is not officially released? Once DWARF 6 is released and clang starts to support DWARF 6, I think we should add the support for DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 in the place that this patch changes.

New DWARF language codes are published ahead of the release of the next version of DWARF, so that they may be used by implementations without having to wait for new DWARF version.

It would therefore make sense to go ahead and add DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 now, without waiting, but only in the non-strict DWARF mode. (There would be the question of whether it would still make sense in the code to say "DwarfVersion >= 6" given that DWARF 6 would be otherwise unsupported... but I don't have a strong view on that question.)

I think it would be strange to check DwarfVersion >= 6 if we can not set dwarf version to 6 by anyways. Maybe we can first add the DWARF 6 support to the front end first(Need a wider discussion). This is the patch where -gdwarf-5 was introduced https://reviews.llvm.org/rG3cb592d6b60c. Seems it was also before DWARF 5 was official released.

Wed, Jun 16, 10:30 PM · Restricted Project, debug-info
shchenz added a comment to D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.

There is no CPlusPlus03 in LangOptions, so it is better not to merge DW_LANG_C_plus_plus_03 support with D99250.

Oh - I see, c++03 is defined in LangStandards.def an alias for c++98, as the former essentially consists of bugfixes for the latter. This loosely suggests to me that C++03 implementations are (likely to be / mostly?) conformant to C++98, but that C++98 implementations may not be fully conformant to C++03. Given this alias, it doesn't seem at all clear to me which of DW_LANG_C_plus_plus_98 and DW_LANG_C_plus_plus_03 would be the better choice, if both C++98 and C++03 must share a language tag... but I presume this has been discussed before. (It also doesn't seem clear whether it would be better to model "c++98" as an alias for "c++03".)

Yes, we don't have DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 in clang for now. I guess this is because clang does not support DWARF 6. DWARF 6 is not officially released? Once DWARF 6 is released and clang starts to support DWARF 6, I think we should add the support for DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 in the place that this patch changes.

New DWARF language codes are published ahead of the release of the next version of DWARF, so that they may be used by implementations without having to wait for new DWARF version.

It would therefore make sense to go ahead and add DW_LANG_C_plus_plus_17 and DW_LANG_C_plus_plus_20 now, without waiting, but only in the non-strict DWARF mode. (There would be the question of whether it would still make sense in the code to say "DwarfVersion >= 6" given that DWARF 6 would be otherwise unsupported... but I don't have a strong view on that question.)

Wed, Jun 16, 7:09 PM · Restricted Project, debug-info
stuart added a comment to D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.

There is no CPlusPlus03 in LangOptions, so it is better not to merge DW_LANG_C_plus_plus_03 support with D99250.

Wed, Jun 16, 3:38 AM · Restricted Project, debug-info

Tue, Jun 15

shchenz closed D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.
Tue, Jun 15, 8:18 PM · Restricted Project, debug-info
shchenz added a comment to D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.

Thanks for review @stuart

Tue, Jun 15, 7:42 PM · Restricted Project, debug-info
AndrewLitteken closed D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Tue, Jun 15, 8:58 AM · debug-info, Restricted Project
AndrewLitteken added inline comments to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Tue, Jun 15, 8:12 AM · debug-info, Restricted Project
stuart planned changes to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C.

Changes will be required to align this with D104291.

Tue, Jun 15, 7:45 AM · debug-info, Restricted Project
stuart accepted D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.
Tue, Jun 15, 7:37 AM · Restricted Project, debug-info
stuart added a comment to D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.

This looks good to me.

Tue, Jun 15, 7:37 AM · Restricted Project, debug-info
stuart added inline comments to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C.
Tue, Jun 15, 7:26 AM · debug-info, Restricted Project
shchenz added inline comments to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C.
Tue, Jun 15, 4:30 AM · debug-info, Restricted Project
shchenz requested review of D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14.
Tue, Jun 15, 4:27 AM · Restricted Project, debug-info
stuart added inline comments to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C.
Tue, Jun 15, 2:59 AM · debug-info, Restricted Project
djtodoro added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

lgtm, thanks!

Tue, Jun 15, 12:31 AM · debug-info, Restricted Project

Mon, Jun 14

CarlosAlbertoEnciso closed D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects..
Mon, Jun 14, 10:54 PM · Restricted Project, debug-info
shchenz added inline comments to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C.
Mon, Jun 14, 6:16 PM · debug-info, Restricted Project
AndrewLitteken added inline comments to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Mon, Jun 14, 8:16 AM · debug-info, Restricted Project
AndrewLitteken updated the diff for D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Mon, Jun 14, 8:16 AM · debug-info, Restricted Project
StephenTozer added inline comments to D104105: [DebugInfo] Prevent non-determinism when updating DIArgList users of a value.
Mon, Jun 14, 3:44 AM · Restricted Project, debug-info

Sun, Jun 13

djtodoro added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

the tests look good to me now, thanks! (some nits included)

Sun, Jun 13, 11:46 PM · debug-info, Restricted Project
SouraVX added a project to D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C: debug-info.
Sun, Jun 13, 10:08 PM · debug-info, Restricted Project
CarlosAlbertoEnciso added a comment to D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects..

@amccarth: Thanks very much for your review.

Sun, Jun 13, 9:49 PM · Restricted Project, debug-info
RamNalamothu closed D76877: Implement DW_CFA_LLVM_* for Heterogeneous Debugging.
Sun, Jun 13, 8:22 PM · debug-info, Restricted Project
RamNalamothu added a comment to D76877: Implement DW_CFA_LLVM_* for Heterogeneous Debugging.

No problem.

Sun, Jun 13, 6:41 PM · debug-info, Restricted Project

Sat, Jun 12

probinson updated subscribers of D103131: support debug info for alias variable.
0x0000002a:   DW_TAG_variable
                DW_AT_name      ("oldname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-

rel/bin/test.c")

                DW_AT_decl_line (1)
                DW_AT_location  (DW_OP_addr 0x0)

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

0x00000046:   DW_TAG_variable
                DW_AT_name      ("newname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-

rel/bin/test.c")

                DW_AT_decl_line (2)
                DW_AT_declaration       (true)

0x00000051:   DW_TAG_imported_declaration
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-

rel/bin/test.c")

DW_AT_decl_line (2)
DW_AT_import    (0x00000046)
DW_AT_name      ("newname")
Sat, Jun 12, 12:12 PM · debug-info, Restricted Project, Restricted Project
dblaikie added a comment to D103131: support debug info for alias variable.

Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.

But yeah, at the moment I don't have any great reason to avoid the imported declaration form - so happy to go with that.

Hi David,

with imported declaration patch and with current patch(in review or say gcc way) this case works ok(we can print type and value of newname)
$cat test.c
int oldname = 1;
extern int newname attribute((alias("oldname")));

but when we make newname static it works with current patch(in review or say gcc way) but it does not work with imported decl patch(https://reviews.llvm.org/D103131?id=347883).

Should we go with gcc way or am I missing something?
note: used gdb debugger.

An ideas what's happening when newname is static? Is the DWARF any different/interesting there? (since the DWARF for imported decl seems like it would have nothing to do with the linkange of the alias - since it doesn't refer to the actual alias in the object file, etc)

There not much different apart from extern has external attribute.
case 1) when newname is static

.debug_info contents:
0x00000000: Compile Unit: length = 0x00000072, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x00000076)

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer    ("clang version 13.0.0 (git@github.com:llvm/llvm-project.git 4cd7169f5517167ef456e82c6dcae669bde6c725)")
              DW_AT_language    (DW_LANG_C99)
              DW_AT_name        ("test.c")
              DW_AT_stmt_list   (0x00000000)
              DW_AT_comp_dir    ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin")
              DW_AT_low_pc      (0x0000000000000000)
              DW_AT_high_pc     (0x0000000000000008)

0x0000002a:   DW_TAG_variable
                DW_AT_name      ("oldname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (1)
                DW_AT_location  (DW_OP_addr 0x0)

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

0x00000046:   DW_TAG_variable
                DW_AT_name      ("newname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (2)
                DW_AT_declaration       (true)

0x00000051:   DW_TAG_imported_declaration
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (2)
                DW_AT_import    (0x00000046)
                DW_AT_name      ("newname")

0x0000005c:   DW_TAG_subprogram
                DW_AT_low_pc    (0x0000000000000000)
                DW_AT_high_pc   (0x0000000000000008)
                DW_AT_frame_base        (DW_OP_reg6 RBP)
                DW_AT_name      ("main")
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (3)
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)

0x00000075:   NULL

case 2) when newname is extern

.debug_info contents:
0x00000000: Compile Unit: length = 0x00000072, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x00000076)

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer    ("clang version 13.0.0 (git@github.com:llvm/llvm-project.git 4cd7169f5517167ef456e82c6dcae669bde6c725)")
              DW_AT_language    (DW_LANG_C99)
              DW_AT_name        ("test.c")
              DW_AT_stmt_list   (0x00000000)
              DW_AT_comp_dir    ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin")
              DW_AT_low_pc      (0x0000000000000000)
              DW_AT_high_pc     (0x0000000000000008)

0x0000002a:   DW_TAG_variable
                DW_AT_name      ("oldname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (1)
                DW_AT_location  (DW_OP_addr 0x0)

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

0x00000046:   DW_TAG_variable
                DW_AT_name      ("newname")
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (2)
                DW_AT_declaration       (true)

0x00000051:   DW_TAG_imported_declaration
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (2)
                DW_AT_import    (0x00000046)
                DW_AT_name      ("newname")

0x0000005c:   DW_TAG_subprogram
                DW_AT_low_pc    (0x0000000000000000)
                DW_AT_high_pc   (0x0000000000000008)
                DW_AT_frame_base        (DW_OP_reg6 RBP)
                DW_AT_name      ("main")
                DW_AT_decl_file ("/folk/kkumar/tcllvm/llvm-build-lldb-rel/bin/test.c")
                DW_AT_decl_line (3)
                DW_AT_type      (0x0000003f "int")
                DW_AT_external  (true)

0x00000075:   NULL
Sat, Jun 12, 10:55 AM · debug-info, Restricted Project, Restricted Project

Fri, Jun 11

kamleshbhalui added a comment to D103131: support debug info for alias variable.

Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.

But yeah, at the moment I don't have any great reason to avoid the imported declaration form - so happy to go with that.

Hi David,

with imported declaration patch and with current patch(in review or say gcc way) this case works ok(we can print type and value of newname)
$cat test.c
int oldname = 1;
extern int newname attribute((alias("oldname")));

but when we make newname static it works with current patch(in review or say gcc way) but it does not work with imported decl patch(https://reviews.llvm.org/D103131?id=347883).

Should we go with gcc way or am I missing something?
note: used gdb debugger.

An ideas what's happening when newname is static? Is the DWARF any different/interesting there? (since the DWARF for imported decl seems like it would have nothing to do with the linkange of the alias - since it doesn't refer to the actual alias in the object file, etc)

Fri, Jun 11, 4:44 PM · debug-info, Restricted Project, Restricted Project
rnk accepted D104105: [DebugInfo] Prevent non-determinism when updating DIArgList users of a value.

Thanks for finding this, I think it looks good.

Fri, Jun 11, 4:37 PM · Restricted Project, debug-info
clayborg accepted D76877: Implement DW_CFA_LLVM_* for Heterogeneous Debugging.

Accepting since no one else had comments. Sorry for the delay.

Fri, Jun 11, 3:41 PM · debug-info, Restricted Project
amccarth accepted D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects..

Thanks for the changes. This LGTM now.

Fri, Jun 11, 3:01 PM · Restricted Project, debug-info
dblaikie added a comment to D103131: support debug info for alias variable.

Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.

But yeah, at the moment I don't have any great reason to avoid the imported declaration form - so happy to go with that.

Hi David,

with imported declaration patch and with current patch(in review or say gcc way) this case works ok(we can print type and value of newname)
$cat test.c
int oldname = 1;
extern int newname attribute((alias("oldname")));

but when we make newname static it works with current patch(in review or say gcc way) but it does not work with imported decl patch(https://reviews.llvm.org/D103131?id=347883).

Should we go with gcc way or am I missing something?
note: used gdb debugger.

Fri, Jun 11, 11:58 AM · debug-info, Restricted Project, Restricted Project
CarlosAlbertoEnciso added inline comments to D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects..
Fri, Jun 11, 10:55 AM · Restricted Project, debug-info
CarlosAlbertoEnciso updated the diff for D103089: [Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects..

Address comments from @amccarth:

Fri, Jun 11, 10:54 AM · Restricted Project, debug-info
AndrewLitteken updated the diff for D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

Remade tests with regexed metadata information.

Fri, Jun 11, 9:52 AM · debug-info, Restricted Project
StephenTozer added a comment to D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands.

Fix for the determinism bug at D104105

Fri, Jun 11, 3:47 AM · Restricted Project, debug-info
StephenTozer requested review of D104105: [DebugInfo] Prevent non-determinism when updating DIArgList users of a value.
Fri, Jun 11, 3:47 AM · Restricted Project, debug-info

Thu, Jun 10

kamleshbhalui added a comment to D103131: support debug info for alias variable.

Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.

But yeah, at the moment I don't have any great reason to avoid the imported declaration form - so happy to go with that.

Thu, Jun 10, 4:58 PM · debug-info, Restricted Project, Restricted Project
plotfi added inline comments to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Thu, Jun 10, 2:43 PM · debug-info, Restricted Project
paquette updated subscribers of D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Thu, Jun 10, 2:36 PM · debug-info, Restricted Project
paquette added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

Does the outliner only run for commoning code, or can it run on a single function (for hot/cold reasons, or anything else)?

BUt yeah, in the commoning case, DWARF (& LLVM IR) have no way to represent this situation and dropping the location is the best tool we have at the moment. It's discussed here: https://llvm.org/docs/HowToUpdateDebugInfo.html#when-to-drop-an-instruction-location

Thu, Jun 10, 2:33 PM · debug-info, Restricted Project
dblaikie added a comment to D103131: support debug info for alias variable.

Any idea if the GDB test suite covers this functionality? I'd hope so, but maybe it doesn't.

Thu, Jun 10, 12:17 PM · debug-info, Restricted Project, Restricted Project
RamNalamothu added a comment to D76877: Implement DW_CFA_LLVM_* for Heterogeneous Debugging.

ping

Thu, Jun 10, 12:16 PM · debug-info, Restricted Project
dblaikie added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

Does the outliner only run for commoning code, or can it run on a single function (for hot/cold reasons, or anything else)?

Thu, Jun 10, 12:08 PM · debug-info, Restricted Project
jmorse added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

I think that's certainly possible. If there was a way in the debug info to say that a specific section of IR is from Section A of the program if called from location A, Section B if called from location B etc that would solve the problem. I don't know enough about DebugInfo to really say how difficult that would be though.

Thu, Jun 10, 9:40 AM · debug-info, Restricted Project
AndrewLitteken added a comment to D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..

I guess this will need something like that -- on both MIR and IR versions of the pass. Any thoughts about this?

Thu, Jun 10, 8:29 AM · debug-info, Restricted Project
StephenTozer added inline comments to D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands.
Thu, Jun 10, 7:49 AM · Restricted Project, debug-info
djtodoro updated subscribers of D87302: [IRSim][IROutliner] Adding DebugInfo handling for IR outlined functions..
Thu, Jun 10, 12:24 AM · debug-info, Restricted Project