[PATCH] D99250: [DebugInfo] Fix the mismatching of C++ language tags and Dwarf versions.

ChenZheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 25 08:16:47 PDT 2021


shchenz added a comment.

In D99250#2650561 <https://reviews.llvm.org/D99250#2650561>, @probinson wrote:

> In D99250#2649507 <https://reviews.llvm.org/D99250#2649507>, @Esme wrote:
>
>> Thx! @aprantl The motivation of the patch came from the crash of tag name mismatching when using DBX under AIX. And modifying the debugger doesn't seem to make sense?
>
> A consumer should not crash when it sees an unexpected value.  This is clearly a DBX problem.  It should have some fallback, for example it could do the same thing it would do if the language attribute was missing entirely.

Yeah, I totally agree with this! A consumer should be friendly enough to handle any unexpected input. The crash is anyhow not a good response.

Back to the DWARF info issue, will it be an issue that a DWARF 5 language value be emitted when the compiling option explicitly specifies the DWARF 3 version? This time it is `DW_LANG_C_plus_plus_14`. 
We plan to check the DWARF info is generated under the correct DWARF version, what if we meet some other issues? A not improper example (NOT exist, just an example) is what if we generate constant class DW_AT_high_pc attribute under -gdwarf-3? I think we should fix this right? For DWARF 3, DW_AT_high_pc attribute should always be a relocatable address.

What you guys think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99250/new/

https://reviews.llvm.org/D99250



More information about the cfe-commits mailing list