You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-addr2line/0001-bump-object-to-0.7.patch

50 lines
2.0 KiB

From 14a771a4bf07050d6ebc3125fcd860bc95e89ba4 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 5 Jan 2018 20:22:15 +0100
Subject: [PATCH] bump object to 0.7
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
src/lib.rs | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
index 45da35c..99c911b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -36,6 +36,7 @@ extern crate cpp_demangle;
#[macro_use]
extern crate error_chain;
+use object::Object;
use owning_ref::OwningHandle;
use fallible_iterator::FallibleIterator;
@@ -311,18 +312,18 @@ where
opts: Options,
endian: Endian,
) -> Result<DebugInfo<'input, Endian>> {
- let debug_info = file.get_section(".debug_info")
+ let debug_info = file.section_data_by_name(".debug_info")
.ok_or(ErrorKind::MissingDebugSection("debug_info"))?;
let debug_info = gimli::DebugInfo::new(debug_info, endian);
- let debug_abbrev = file.get_section(".debug_abbrev")
+ let debug_abbrev = file.section_data_by_name(".debug_abbrev")
.ok_or(ErrorKind::MissingDebugSection("debug_abbrev"))?;
let debug_abbrev = gimli::DebugAbbrev::new(debug_abbrev, endian);
- let debug_line = file.get_section(".debug_line")
+ let debug_line = file.section_data_by_name(".debug_line")
.ok_or(ErrorKind::MissingDebugSection("debug_line"))?;
let debug_line = gimli::DebugLine::new(debug_line, endian);
- let debug_ranges = file.get_section(".debug_ranges").unwrap_or(&[]);
+ let debug_ranges = file.section_data_by_name(".debug_ranges").unwrap_or(&[]);
let debug_ranges = gimli::DebugRanges::new(debug_ranges, endian);
- let debug_str = file.get_section(".debug_str").unwrap_or(&[]);
+ let debug_str = file.section_data_by_name(".debug_str").unwrap_or(&[]);
let debug_str = gimli::DebugStr::new(debug_str, endian);
let mut units = Vec::new();
--
2.15.1