diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-12-04 11:45:21 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-12-04 11:45:21 -0500 |
| commit | a03219926d8797bc57cb87339a3994faf30a44fa (patch) | |
| tree | 6d47f24591744f5340478b688a6b7df70c44e8d0 /rust/examples | |
| parent | 815c3fa9cd3334bdc010a07db431735b49c71546 (diff) | |
Add support for DW_OP_addrx lookups for data variables
Diffstat (limited to 'rust/examples')
| -rw-r--r-- | rust/examples/dwarf/dwarf_import/src/types.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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<R: ReaderType>( 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); }, |
