This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add support for DW_TAG_immutable_type
Changes PlannedPublic

Authored by ljmf00 on Nov 10 2021, 5:29 PM.

Details

Reviewers
shafik

Diff Detail

Event Timeline

ljmf00 created this revision.Nov 10 2021, 5:29 PM
ljmf00 requested review of this revision.Nov 10 2021, 5:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2021, 5:29 PM
ljmf00 planned changes to this revision.Nov 10 2021, 5:30 PM

I still need to add tests.

Are the DWARFASTParserClang changes meant as a step towards making it parse D?

Are the DWARFASTParserClang changes meant as a step towards making it parse D?

Yes, not only D but any language that currently falls here (https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp#L106-L112). AFAIK, rust have immutable variables too. Since I'm working on a DWARFFASTParser for D this won't affect it in the future, but for languages like Rust that uses the Python API and rely on Clang DWARFParser, this could be beneficial.

ljmf00 added a subscriber: Geod24.Nov 11 2021, 6:22 AM

Are the DWARFASTParserClang changes meant as a step towards making it parse D?

Yes, not only D but any language that currently falls here (https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp#L106-L112). AFAIK, rust have immutable variables too. Since I'm working on a DWARFFASTParser for D this won't affect it in the future, but for languages like Rust that uses the Python API and rely on Clang DWARFParser, this could be beneficial.

I know the change is well intended, but the Rust support is 100% untested and completely broken (it can't deal with pretty much any non-trivial program from my recollections). So I would split out the Clang changes (which probably require some longer discussion) and just keep the Type/DWARFDIe changes (which look good to me).

Are the DWARFASTParserClang changes meant as a step towards making it parse D?

Yes, not only D but any language that currently falls here (https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp#L106-L112). AFAIK, rust have immutable variables too. Since I'm working on a DWARFFASTParser for D this won't affect it in the future, but for languages like Rust that uses the Python API and rely on Clang DWARFParser, this could be beneficial.

I know the change is well intended, but the Rust support is 100% untested and completely broken (it can't deal with pretty much any non-trivial program from my recollections). So I would split out the Clang changes (which probably require some longer discussion) and just keep the Type/DWARFDIe changes (which look good to me).

Ok, makes sense to me. I'm going to make a separate patch, mark you as a subscriber and discuss this there.