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; }