Skip to content

Commit

Permalink
Use the LocationLists::locations_dwo method if we have a dwo file.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Jul 14, 2020
1 parent 2e2a64f commit 3bdd667
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/read/dwarf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,22 @@ impl<R: Reader> Dwarf<R> {
unit: &Unit<R>,
offset: LocationListsOffset<R::Offset>,
) -> Result<LocListIter<R>> {
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.
Expand Down

0 comments on commit 3bdd667

Please sign in to comment.