From 178e38ae865e269e7fac9e39c2e5ce6b28cf6208 Mon Sep 17 00:00:00 2001 From: Dominik Boehi Date: Mon, 15 Apr 2024 21:11:53 +0200 Subject: [PATCH 1/3] Update gimli to 0.29.0 --- decoder/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoder/Cargo.toml b/decoder/Cargo.toml index 747bbd61..b98c0eaf 100644 --- a/decoder/Cargo.toml +++ b/decoder/Cargo.toml @@ -31,7 +31,7 @@ defmt-json-schema = { version = "0.1", path = "./defmt-json-schema" } # elf2table anyhow = "1.0.65" -gimli = { version = "0.28", default-features = false, features = [ +gimli = { version = "0.29", default-features = false, features = [ "read", "std", ] } From 14e35ec558321973c94f1edf05acee7490c69bb7 Mon Sep 17 00:00:00 2001 From: Dominik Boehi Date: Mon, 15 Apr 2024 21:18:47 +0200 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a09ad5b8..5fb0f766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- [#828]: `defmt-decoder`: Update to `gimli 0.29` - [#821]: Cleanup - [#813]: doc: add note for the alloc feature flag - [#812]: `defmt`: Add a feature to stop linking a default panic handler - [#811]: `book`: Add some examples for byte slice/array hints as well - [#800]: `defmt-macros`: Fix generic trait bounds in Format derive macro +[#828]: https://github.com/knurling-rs/defmt/pull/828 [#821]: https://github.com/knurling-rs/defmt/pull/821 [#813]: https://github.com/knurling-rs/defmt/pull/813 [#812]: https://github.com/knurling-rs/defmt/pull/812 From 0236e89ea8f40f3d7b22ad2456261fc5a903c0b8 Mon Sep 17 00:00:00 2001 From: Dominik Boehi Date: Mon, 15 Apr 2024 21:34:04 +0200 Subject: [PATCH 3/3] Fix deprecation --- decoder/src/elf2table/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/decoder/src/elf2table/mod.rs b/decoder/src/elf2table/mod.rs index 02145c3f..c2f026b4 100644 --- a/decoder/src/elf2table/mod.rs +++ b/decoder/src/elf2table/mod.rs @@ -272,15 +272,16 @@ pub fn get_locations(elf: &[u8], table: &Table) -> Result>::load::<_, anyhow::Error>(&load_section)?; - dwarf_cow.load_sup::<_, anyhow::Error>(&load_section_sup)?; + let dwarf_sections = + gimli::DwarfSections::>::load::<_, anyhow::Error>(&load_section)?; + let dwarf_sup_sections = gimli::DwarfSections::load::<_, anyhow::Error>(&load_section_sup)?; let borrow_section: &dyn for<'a> Fn( &'a Cow<[u8]>, ) -> gimli::EndianSlice<'a, gimli::RunTimeEndian> = &|section| gimli::EndianSlice::new(section, endian); - let dwarf = dwarf_cow.borrow(&borrow_section); + let dwarf = dwarf_sections.borrow_with_sup(&dwarf_sup_sections, &borrow_section); let mut units = dwarf.debug_info.units();