-
Notifications
You must be signed in to change notification settings - Fork 26
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 split debug information #60
Comments
This will likely come once we switch to using Edit: Not meaning to imply that it will just magically happen, but more that |
So it appears there is some overlap with #208. Specifically, as per my limited understanding, split DWARF is really a catch-all for:
We may have to support all three. I believe (but haven't tested), that the first one should already work (as it's not really a different/extended format), though we may need to support following debug links specifically. The other two require special handling. |
I will add some of the use cases I encounter on split debug in case this helps with prioritization / testing.
The build-ids match, the gnu-debuglink points to libcoreclr.so.dbg
|
Thanks for the example! Debug link support is indeed most likely the first thing that will come here, as the DWARF format shouldn't be any different from what I understand.
Do you have use cases where the debug information is contained in a different folder? My reading of the "spec" is that only a file name is stored in the link, no path. So in a first version I think the assumption will be that the |
Oh okay, seems as if
So it's looking in various "well known" directories...great. |
FYI, Debug link support is coming with #665 |
This change adds debug link support to our DwarfResolver. Specifically, when a DwarfResolver is created, we check whether the opened file contains a debug link. If so, we try to find the target file it represents in a list of known directories and then load the DWARF information from there. If none of the directories contains the file, the debug link will be silently ignored. The reason for this behavior is that many distributions seem to distribute binaries with debug links in them, but then make the linked debug information optional by having it contained in a dedicated package. There are many locations at which this functionality could fit it. Considered candidates are: 1) ElfResolverData::elf_resolver(), 2) ElfResolver itself, and 3) DwarfResolver (the approach taken). 1) is somewhat nice because it keep the existing resolver simple and to the point. However, it is insufficient, because we expose ElfResolver publicly and we most certainly want to enable debug link support for users. Implementation inside ElfResolver is possible, but it seems inferior to putting everything into DwarfResolver: we only intend to follow debug links if DWARF support is enabled and eventually we could consider checking both the original ELF file as well as the linkee ELF file as fallback options when no symbol is found. As such, DwarfResolver seems like the most apt location. Refs: #60 Signed-off-by: Daniel Müller <[email protected]>
We should support split debug information.
The text was updated successfully, but these errors were encountered: