Repository: gimli-rs/addr2line
Pull request #274 (2023-04-15 04:51:54)

Release 0.20.0


Patch:
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 7d05366..7b7a462 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -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.58.0 && rustup default 1.58.0
       - name: Build
         run: cargo build
 
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c88c6b..662490a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,37 @@
+# `addr2line` Change Log
+
+--------------------------------------------------------------------------------
+
+## 0.20.0 (2023/04/15)
+
+### Breaking changes
+
+* The minimum supported rust version is 1.58.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.
+
+### 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
diff --git a/Cargo.toml b/Cargo.toml
index e6e5bf1..a06f8e8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"]
@@ -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 }
@@ -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"
 


Test patch:
diff --git a/tests/output_equivalence.rs b/tests/output_equivalence.rs
index cfd1620..ef026e3 100644
--- a/tests/output_equivalence.rs
+++ b/tests/output_equivalence.rs
@@ -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> {
@@ -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());
@@ -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 {
@@ -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()
 }
@@ -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();
 }