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

Support iteration across eh_frame_hdr binary search table #619

Merged
merged 4 commits into from
Apr 9, 2022
Merged

Support iteration across eh_frame_hdr binary search table #619

merged 4 commits into from
Apr 9, 2022

Conversation

crzysdrs
Copy link
Contributor

@crzysdrs crzysdrs commented Apr 8, 2022

Allows for iteration across the binary search table entries found in the .eh_frame_hdr.

Closes #612

@philipc
Copy link
Collaborator

philipc commented Apr 8, 2022

What do you need this for?

@crzysdrs
Copy link
Contributor Author

crzysdrs commented Apr 8, 2022

The product I am currently working on does runtime manipulation of eh_frames, the binary search table and the corresponding headers. Traversal of the binary search table allows us to avoid unnecessarily visiting CIEs (which we aren't interested in) when modifying FDEs as well as verifying the correctness of any modifications to the table itself.

@philipc
Copy link
Collaborator

philipc commented Apr 8, 2022

Are you modifying the binary search table too? It seems doing that would require duplicating some of this code. I'm not certain that an iterator is the best API for this sort of manipulation. Ideally you would operate on a slice of entries (although that might run into difficulties with supporting multiple pointer sizes).

@crzysdrs
Copy link
Contributor Author

crzysdrs commented Apr 8, 2022 via email

src/read/cfi.rs Show resolved Hide resolved
src/read/cfi.rs Show resolved Hide resolved
src/read/cfi.rs Show resolved Hide resolved
src/read/cfi.rs Outdated Show resolved Hide resolved
src/read/cfi.rs Outdated Show resolved Hide resolved
src/read/cfi.rs Outdated Show resolved Hide resolved
src/read/cfi.rs Outdated Show resolved Hide resolved
@crzysdrs crzysdrs requested a review from philipc April 8, 2022 20:03
@philipc philipc merged commit d73747e into gimli-rs:master Apr 9, 2022
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.

Feature request: Ability to iterate over all entries in the EhHdrTable
2 participants