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

sidecar: Remove usage of deprecated APIs #80

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

d-e-s-o
Copy link
Contributor

@d-e-s-o d-e-s-o commented Sep 30, 2024

The gimli crate deprecated the Dwarf::borrow() method some time back. Not using it makes it super inconvenient to support our current workflow. However, addr2line recently introduced the Context::from_arc_dwarf() constructor which allows us to keep existing code structure. Switch over to using it and remove usage of the deprecated Dwarf::borrow().

The gimli crate deprecated the Dwarf::borrow() method some time back.
Not using it makes it super inconvenient to support our current
workflow. However, addr2line recently introduced the
Context::from_arc_dwarf() constructor which allows us to keep existing
code structure. Switch over to using it and remove usage of the
deprecated Dwarf::borrow().

Signed-off-by: Daniel Müller <deso@posteo.net>
@d-e-s-o
Copy link
Contributor Author

d-e-s-o commented Sep 30, 2024

This will likely need to wait until the next addr2line release is cut that contains gimli-rs/addr2line@5d10d81.

@anakryiko
Copy link
Owner

@philipc is there any chance you can cut a new release of addr2line to help us get rid of this deprecation warning?

@philipc
Copy link

philipc commented Oct 1, 2024

I'm currently working on another addr2line fix which I would like to finish before doing a release, but hopefully that won't be long.

Some comments on the usage here. gimli::Dwarf::borrow was being used here as a substitute for the lack of gimli::Dwarf::clone (rather than its intended usage of borrowing owned data), so I'm happy that this is switching to use an actual clone. However, I'm surprised that you need to use supplementary object files in the first place, since I haven't seen them used with the Linux kernel before, and the "sup" addr2line argument doesn't appear to be used when calling this.

@philipc
Copy link

philipc commented Oct 4, 2024

Released addr2line 0.24.2.

@d-e-s-o d-e-s-o marked this pull request as ready for review October 4, 2024 18:20
@anakryiko anakryiko merged commit 0cd5598 into anakryiko:master Oct 4, 2024
2 checks passed
@d-e-s-o d-e-s-o deleted the topic/non-deprecated-apis branch October 4, 2024 20:15
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.

3 participants