Skip to content

Commit

Permalink
Merge c161f33 into 8a53bfd
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Apr 15, 2023
2 parents 8a53bfd + c161f33 commit b51f4a0
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install rust
run: rustup update 1.55.0 && rustup default 1.55.0
run: rustup update 1.57.0 && rustup default 1.57.0
- name: Build
run: cargo build

Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# `addr2line` Change Log

--------------------------------------------------------------------------------

## 0.20.0 (2023/04/15)

### Breaking changes

* The minimum supported rust version is 1.57.0.

* Changed `Context::find_frames` to return `LookupResult`.
Use `LookupResult::skip_all_loads` to obtain the result without loading split DWARF.
[#260](https://github.com/gimli-rs/addr2line/pull/260)

* Replaced `Context::find_dwarf_unit` with `Context::find_dwarf_and_unit`.
[#260](https://github.com/gimli-rs/addr2line/pull/260)

* Updated `object` dependency and disabled `compression` feature.

### Changed

* Fix handling of file index 0 for DWARF 5.
[#264](https://github.com/gimli-rs/addr2line/pull/264)

### Added

* Added types and methods to support loading split DWARF:
`LookupResult`, `SplitDwarfLoad`, `SplitDwarfLoader`, `Context::preload_units`.
[#260](https://github.com/gimli-rs/addr2line/pull/260)
[#262](https://github.com/gimli-rs/addr2line/pull/262)
[#263](https://github.com/gimli-rs/addr2line/pull/263)

--------------------------------------------------------------------------------

## 0.19.0 (2022/11/24)

### Breaking changes
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "addr2line"
version = "0.19.0"
version = "0.20.0"
description = "A cross-platform symbolication library written in Rust, using `gimli`"
documentation = "https://docs.rs/addr2line"
exclude = ["/benches/*", "/fixtures/*", ".github"]
Expand All @@ -15,7 +15,7 @@ edition = "2018"
gimli = { version = "0.27.2", default-features = false, features = ["read"] }
fallible-iterator = { version = "0.2", default-features = false, optional = true }
memmap2 = { version = "0.5.5", optional = true }
object = { version = "0.30.0", default-features = false, features = ["read"], optional = true }
object = { version = "0.31.0", default-features = false, features = ["read"], optional = true }
smallvec = { version = "1", default-features = false, optional = true }
rustc-demangle = { version = "0.1", optional = true }
cpp_demangle = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
Expand All @@ -30,7 +30,7 @@ compiler_builtins = { version = '0.1.2', optional = true }
clap = "3.1.6"
backtrace = "0.3.13"
findshlibs = "0.10"
rustc-test = "0.3"
libtest-mimic = "0.5.2"
auxiliary = { path = "tests/auxiliary" }
typed-arena = "2"

Expand Down
31 changes: 11 additions & 20 deletions tests/output_equivalence.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
extern crate rustc_test as test;

use std::env;
use std::ffi::OsStr;
use std::path::Path;
use std::process::Command;

use crate::test::{ShouldPanic, TestDesc, TestDescAndFn, TestFn, TestName};
use backtrace::Backtrace;
use findshlibs::{IterationControl, SharedLibrary, TargetSharedLibrary};
use libtest_mimic::{Arguments, Failed, Trial};

#[inline(never)]
fn make_trace() -> Vec<String> {
Expand Down Expand Up @@ -55,7 +53,7 @@ fn run_cmd<P: AsRef<OsStr>>(exe: P, me: &Path, flags: Option<&str>, trace: &str)
String::from_utf8(output.stdout).unwrap()
}

fn run_test(flags: Option<&str>) {
fn run_test(flags: Option<&str>) -> Result<(), Failed> {
let me = env::current_exe().unwrap();
let mut exe = me.clone();
assert!(exe.pop());
Expand Down Expand Up @@ -98,11 +96,12 @@ $ {3} {0} --exe {1} {2}
ours
);
}
Ok(())
}

static FLAGS: &str = "aipsf";

fn make_tests() -> Vec<TestDescAndFn> {
fn make_tests() -> Vec<Trial> {
(0..(1 << FLAGS.len()))
.map(|bits| {
if bits == 0 {
Expand All @@ -118,19 +117,11 @@ fn make_tests() -> Vec<TestDescAndFn> {
Some(param)
}
})
.map(|param| TestDescAndFn {
desc: TestDesc {
name: TestName::DynTestName(format!(
"addr2line {}",
param.as_ref().map_or("", String::as_str)
)),
ignore: false,
should_panic: ShouldPanic::No,
allow_fail: false,
},
testfn: TestFn::DynTestFn(Box::new(move || {
run_test(param.as_ref().map(String::as_str))
})),
.map(|param| {
Trial::test(
format!("addr2line {}", param.as_ref().map_or("", String::as_str)),
move || run_test(param.as_ref().map(String::as_str)),
)
})
.collect()
}
Expand All @@ -139,6 +130,6 @@ fn main() {
if !cfg!(target_os = "linux") {
return;
}
let args: Vec<_> = env::args().collect();
test::test_main(&args, make_tests());
let args = Arguments::from_args();
libtest_mimic::run(&args, make_tests()).exit();
}

0 comments on commit b51f4a0

Please sign in to comment.