diff --git a/src/read/dwarf.rs b/src/read/dwarf.rs index fb6d9dea..10636c23 100644 --- a/src/read/dwarf.rs +++ b/src/read/dwarf.rs @@ -381,13 +381,22 @@ impl Dwarf { unit: &Unit, offset: LocationListsOffset, ) -> Result> { - self.locations.locations( - offset, - unit.encoding(), - unit.low_pc, - &self.debug_addr, - unit.addr_base, - ) + match self.file_type { + DwarfFileType::Main => self.locations.locations( + offset, + unit.encoding(), + unit.low_pc, + &self.debug_addr, + unit.addr_base, + ), + DwarfFileType::Dwo => self.locations.locations_dwo( + offset, + unit.encoding(), + unit.low_pc, + &self.debug_addr, + unit.addr_base, + ), + } } /// Try to return an attribute value as a location list offset.