From 00a74653285ed18663e41436338d2372e0939736 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 28 Oct 2023 00:13:56 +0100 Subject: [PATCH] Update gimli version --- Cargo.toml | 2 +- src/lib.rs | 1 + src/unwinder/frame.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 33ac4ec..9e60f08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/nbdd0121/unwinding/" members = ["cdylib", "example"] [dependencies] -gimli = { version = "0.26.1", default-features = false, features = ["read-core"] } +gimli = { version = "0.28", default-features = false, features = ["read-core"] } libc = { version = "0.2", optional = true } spin = { version = "0.9.8", optional = true, default-features = false, features = ["mutex", "spin_mutex"] } core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' } diff --git a/src/lib.rs b/src/lib.rs index faa4488..44ecc37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ #![doc = include_str!("../README.md")] #![feature(c_unwind)] #![feature(naked_functions)] +#![feature(non_exhaustive_omitted_patterns_lint)] // lang_items is an internal feature. `internal_features` lint is added recently // so also allow unknown lints to prevent warning in older nightly versions. #![cfg_attr( diff --git a/src/unwinder/frame.rs b/src/unwinder/frame.rs index 8659bfe..9ede0a1 100644 --- a/src/unwinder/frame.rs +++ b/src/unwinder/frame.rs @@ -144,6 +144,7 @@ impl Frame { new_ctx[Arch::SP] = cfa as _; new_ctx[Arch::RA] = 0; + #[warn(non_exhaustive_omitted_patterns)] for (reg, rule) in row.registers() { let value = match *rule { RegisterRule::Undefined | RegisterRule::SameValue => ctx[*reg], @@ -158,6 +159,8 @@ impl Frame { } RegisterRule::ValExpression(expr) => self.evaluate_expression(ctx, expr)?, RegisterRule::Architectural => unreachable!(), + RegisterRule::Constant(value) => value as usize, + _ => unreachable!(), }; new_ctx[*reg] = value; }