[all-commits] [llvm/llvm-project] e84751: [lldb] Add basic support to Rust enums in TypeSyst...
Vladimir Makaev via All-commits
all-commits at lists.llvm.org
Wed Aug 16 18:35:30 PDT 2023
Author: Vladimir Makaev <vmakaev at gmail.com>
Date: 2023-08-17 (Thu, 17 Aug 2023)
[lldb] Add basic support to Rust enums in TypeSystemClang
LLDB doesn't yet have a TypeSystemRust implemented however it is used to debug Rust applications. Most of the types map well enough to Clang types and there are python formatters implemented to display those types reasonably well in a debugger.
However, Rust enums are completely ignored by LLDB as Clang never emits DW_TAG_variant_part inside DW_TAG_structure_type
This diff adds a parser for DW_TAG_variant_part (Rust-only) that creates a matching valid Clang declaration to the Rust enum. As long as there is enough information and all fields have correct offsets synthetic/summary providers can be implemented to display it correctly when debugging Rust code
Differential Revision: https://reviews.llvm.org/D149213
More information about the All-commits