Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gimli to 0.29.0 #828

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/knurling-rs/defmt/pull/828
[#821]: https:/knurling-rs/defmt/pull/821
[#813]: https:/knurling-rs/defmt/pull/813
[#812]: https:/knurling-rs/defmt/pull/812
Expand Down
2 changes: 1 addition & 1 deletion decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
] }
Expand Down
7 changes: 4 additions & 3 deletions decoder/src/elf2table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,16 @@ pub fn get_locations(elf: &[u8], table: &Table) -> Result<Locations, anyhow::Err
};
let load_section_sup = |_| Ok(Cow::Borrowed(&[][..]));

let mut dwarf_cow = gimli::Dwarf::<Cow<[u8]>>::load::<_, anyhow::Error>(&load_section)?;
dwarf_cow.load_sup::<_, anyhow::Error>(&load_section_sup)?;
let dwarf_sections =
gimli::DwarfSections::<Cow<[u8]>>::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();

Expand Down
Loading