From a03219926d8797bc57cb87339a3994faf30a44fa Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 4 Dec 2024 11:45:21 -0500 Subject: Add support for DW_OP_addrx lookups for data variables --- rust/examples/dwarf/dwarf_import/src/types.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'rust/examples') diff --git a/rust/examples/dwarf/dwarf_import/src/types.rs b/rust/examples/dwarf/dwarf_import/src/types.rs index bfc7b17d..4914b501 100644 --- a/rust/examples/dwarf/dwarf_import/src/types.rs +++ b/rust/examples/dwarf/dwarf_import/src/types.rs @@ -61,6 +61,17 @@ pub(crate) fn parse_variable( debug_info_builder.add_data_variable(address, full_name, uid) } }, + Ok(Operation::AddressIndex { index }) => { + if let Some(uid) = type_uid { + if let Ok(address) = dwarf.address(unit, index) { + debug_info_builder.add_data_variable(address, full_name, uid) + } + else + { + warn!("Invalid index into IAT: {}", index.0); + } + } + }, Ok(op) => { debug!("Unhandled operation type for variable: {:?}", op); }, -- cgit v1.3.1