Skip to main content

write

Function write 

Source
pub fn write(unit: &Unit) -> Result<Info, Error>
Expand description

The sections a unit’s line information goes in.

The result is empty when nothing in the unit has a row, which is a file of declarations and a file whose every function was dropped. An empty .debug_line is worse than no section at all, since a reader would find a unit covering no addresses and have to decide what that meant.

§Errors

Error::Refused for anything the DWARF writer objected to. Every value it is handed here came out of this compiler, so that is a bug here rather than a program’s mistake.