mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-19 09:55:28 +00:00
Display correct line numbers for multiple .text sections (#63)
* Support multiple DWARF sequences * Rework DWARF line info parsing - Properly handles multiple sections in DWARF 1 - line_info moved into ObjSection - DWARF 2 parser no longer errors with no .text section - Both parsers properly skip empty sections * Simplify line_info (no Option) --------- Co-authored-by: Luke Street <luke.street@encounterpc.com>
This commit is contained in:
@@ -39,6 +39,8 @@ pub struct ObjSection {
|
||||
pub symbols: Vec<ObjSymbol>,
|
||||
pub relocations: Vec<ObjReloc>,
|
||||
pub virtual_address: Option<u64>,
|
||||
/// Line number info (.line or .debug_line section)
|
||||
pub line_info: BTreeMap<u64, u64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
@@ -128,8 +130,6 @@ pub struct ObjInfo {
|
||||
pub sections: Vec<ObjSection>,
|
||||
/// Common BSS symbols
|
||||
pub common: Vec<ObjSymbol>,
|
||||
/// Line number info (.line or .debug_line section)
|
||||
pub line_info: Option<BTreeMap<u64, u64>>,
|
||||
/// Split object metadata (.note.split section)
|
||||
pub split_meta: Option<SplitMeta>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user