Skip to content

Commit

Permalink
write: implement .debug_line
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Dec 8, 2018
1 parent bce062a commit 7fdccbb
Show file tree
Hide file tree
Showing 6 changed files with 1,857 additions and 69 deletions.
12 changes: 12 additions & 0 deletions src/read/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,16 @@ where
self.header_length
}

/// Get the size in bytes of a target machine address.
pub fn address_size(&self) -> u8 {
self.address_size
}

/// Whether this line program is encoded in 64- or 32-bit DWARF.
pub fn format(&self) -> Format {
self.format
}

/// Get the minimum instruction length any opcode in this header's line
/// program may have.
pub fn minimum_instruction_length(&self) -> u8 {
Expand Down Expand Up @@ -1168,6 +1178,8 @@ where
/// The source file with the given file index.
///
/// A file index of 0 corresponds to the compilation unit file.
/// Note that a file index of 0 is invalid for DWARF version <= 4,
/// but we support it anyway.
pub fn file(&self, file: u64) -> Option<&FileEntry<R>> {
if file == 0 {
self.comp_name.as_ref()
Expand Down
Loading

0 comments on commit 7fdccbb

Please sign in to comment.