Skip to content
Snippets Groups Projects
Unverified Commit 684daed8 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Merge the new upstream version into debian/unstable

parents f975d417 edaae999
No related branches found
No related tags found
1 merge request!8Update from debian/unstable for apertis/v2022dev3
[package]
name = "dwarf2sources"
version = "0.1.1"
version = "0.2.0"
authors = ["Sjoerd Simons <sjoerd@collabora.com>"]
edition = "2018"
......@@ -9,9 +9,9 @@ edition = "2018"
anyhow = "1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
gimli = "0.16"
fallible-iterator = "0.1"
gimli = "0.19"
fallible-iterator = "0.2"
memmap = "0.7"
object = { version = "0.11", features = [ "std", "compression" ] }
object = { version = "0.12", features = [ "std", "compression" ] }
typed-arena = "2"
structopt = "0.2"
structopt = "0.3"
......@@ -7,12 +7,12 @@ Build-Depends: debhelper-compat (= 12),
dh-cargo,
librust-anyhow-1-dev,
librust-fallible-iterator-0-dev,
librust-gimli-0+default-dev (>= 0.16),
librust-gimli-0+indexmap-dev (>= 0.19),
librust-memmap-0-dev (>= 0.7),
librust-object-0+default-dev (>= 0.11),
librust-object-0+default-dev (>= 0.12),
librust-serde-1+derive-dev,
librust-serde-json-1-dev,
librust-structopt-0+default-dev (>= 0.2),
librust-structopt-0+default-dev (>= 0.3),
librust-typed-arena-2-dev
Standards-Version: 4.5.0
Homepage: https://gitlab.apertis.org/pkg/dwarf2sources
......
......@@ -4,13 +4,13 @@
anyhow = "1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
-gimli = "0.16"
-fallible-iterator = "0.1"
+gimli = ">= 0.16"
-gimli = "0.19"
-fallible-iterator = "0.2"
+gimli = ">= 0.19"
+fallible-iterator = "0"
memmap = "0.7"
-object = { version = "0.11", features = [ "std", "compression" ] }
+object = { version = ">= 0.11", features = [ "std", "compression" ] }
-object = { version = "0.12", features = [ "std", "compression" ] }
+object = { version = ">= 0.12", features = [ "std", "compression" ] }
typed-arena = "2"
-structopt = "0.2"
+structopt = ">= 0.2"
-structopt = "0.3"
+structopt = ">= 0.3"
// Based on the gimli 0.16.1 dwarfdump.rs example
use anyhow::{anyhow, Error, Result};
use fallible_iterator::{convert, FallibleIterator};
use gimli::{Endianity, Reader};
use gimli::{AttributeValue, Endianity, Reader};
use object::Object;
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer};
......@@ -81,17 +81,29 @@ fn list_entries<R: Reader>(
.map::<Result<String>, _>(|s| Ok(s.to_string()?.into_owned()))
.transpose()?
.ok_or_else(|| anyhow!("Missing DW_AT_comp_dir"))?;
let comp_name = entry
let at_name = entry
.attr(gimli::DW_AT_name)?
.and_then(|attr| attr.string_value(debug_str))
.map::<Result<String>, _>(|s| Ok(s.to_string()?.into_owned()))
.transpose()?
.ok_or_else(|| anyhow!("Missing DW_AT_name"))?;
v.push(Unit {
comp_dir,
comp_name,
});
if let Some(r) = at_name.string_value(debug_str) {
let comp_name = r.to_string()?;
if comp_name == "<artificial>" {
eprintln!("Warning: Artificial name in compile unit, probably DWARF debug information has been generated with LTO")
} else {
v.push(Unit {
comp_dir,
comp_name: comp_name.into_owned(),
});
}
} else {
match at_name.raw_value() {
AttributeValue::DebugStrRefSup(_) => {
eprintln!("Warning: compilation unit name in supplemental file")
}
_ => eprintln!("Warning: compilation unit has unexpected name type"),
}
}
}
}
Ok(v)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment