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

Rework the (Relocatable)Debuginfo structs #115

Open
bjorn3 opened this issue Sep 24, 2020 · 0 comments
Open

Rework the (Relocatable)Debuginfo structs #115

bjorn3 opened this issue Sep 24, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Sep 24, 2020

Currently RelocatableDebuginfo has a single Debuginfo entry for each memory map. This Debuginfo entry then contains a memmap::Mmap an object::File and several parsed structs derived from it. This struct is self-referential. What I imagine is that RelocatableDebuginfo becomes the self-referential type with several memmap::Mmap. One for each object file and not for each memory map. It will also contain a single Debuginfo for each object file which refers to the Mmap in RelocatableDebuginfo. RelocatableDebuginfo will then get a with method that makes it possible to add new Mmap and access/modify the Debuginfo within a closure.

This design will reduce the amount of times an object file is parsed to once. It will also allow reusing the same parsed debuginfo when memory mapa change. In addition it will eliminate the necessity of wrapper functions on Debuginfo for everything to handle the self-referentialness. Lastly it is necessary to handle dwarf unwinding, as that needs to get access to the offsets of the .text and .plt sections from within the handling of the .eh_frame section.

@bjorn3 bjorn3 added the enhancement New feature or request label Sep 24, 2020
@bjorn3 bjorn3 self-assigned this Sep 24, 2020
@bjorn3 bjorn3 removed their assignment Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant