Fix value label ranges resolution (#1572)
There was a bug how value labels were resolved, which caused some DWARF expressions not be transformed, e.g. those are in the registers. * Implements FIXME in expression.rs * Move TargetIsa from CompiledExpression structure * Fix expression format for GDB * Add tests for parsing * Proper logic in ValueLabelRangesBuilder::process_label * Tests for ValueLabelRangesBuilder * Refactor build_with_locals to return Iterator instead of Vec<_> * Misc comments and magical numbers
This commit is contained in:
@@ -597,20 +597,6 @@ impl AddressTransform {
|
||||
let map = &self.map[index];
|
||||
(map.wasm_start, map.wasm_end)
|
||||
}
|
||||
|
||||
pub fn convert_to_code_range(
|
||||
&self,
|
||||
addr: write::Address,
|
||||
len: u64,
|
||||
) -> (GeneratedAddress, GeneratedAddress) {
|
||||
let start = if let write::Address::Symbol { addend, .. } = addr {
|
||||
// TODO subtract self.map[symbol].offset ?
|
||||
addend as GeneratedAddress
|
||||
} else {
|
||||
unreachable!();
|
||||
};
|
||||
(start, start + len as GeneratedAddress)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user