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

decoder: Ignore AArch64 mapping symbols #775

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

paulmenage
Copy link
Contributor

@paulmenage paulmenage commented Aug 26, 2023

The AArch64 ELF spec includes "mapping symbols" for identifying contiguous data/code regions in a binary:
https:/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst#mapping-symbols

Ignore these if we encounter them in the ".defmt" section rather than returning an error such as
Error: failed to demangle defmt symbol '$d.3': expected value at line 1 column 1

The AArch64 ELF spec includes "mapping symbols" for identifying contiguous
data/code regions in a binary:
https:/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst#mapping-symbols

Ignore these if we encounter them in the ".defmt" section rather than returning
an error.
@paulmenage paulmenage changed the title Decoder: Ignore AArch64 mapping symbols decoder: Ignore AArch64 mapping symbols Aug 26, 2023
@Urhengulas
Copy link
Member

Can you please share the error you encounter without the PR?

@paulmenage
Copy link
Contributor Author

I get an error like Error: failed to demangle defmt symbol $d.3: expected value at line 1 column 1 when calling defmt_decoder::Table::parse() on the contents of the aarch64 binary. (Added the error to the PR description).

Error was:
```
error: &-masking with zero
  --> qemu/src/bin/bitflags.rs:10:1
   |
10 | / bitflags! {
11 | |     #[allow(clippy::bad_bit_mask)]
12 | |     struct Flags: u8 {
13 | |         #[cfg(not(never))]
...  |
23 | |     }
24 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
   = note: `#[deny(clippy::bad_bit_mask)]` on by default
   = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
```
@Urhengulas Urhengulas added this pull request to the merge queue Aug 30, 2023
Merged via the queue into knurling-rs:main with commit 82882c8 Aug 30, 2023
16 checks passed
@paulmenage paulmenage deleted the mapping-symbols branch September 16, 2023 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants