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

Reconstruct template parameters #1

Open
wants to merge 2 commits into
base: oid-archive-1049772
Choose a base branch
from

Conversation

ttreyer
Copy link
Collaborator

@ttreyer ttreyer commented Nov 21, 2023

Heavily templated code generates large amount of string to be stored in the .debug_str DWARF section. If the total size is above 4GiB, DWARF cannot address the strings beyond that limit and the linker might refuse to link the program. A solution is to use the compiler option -gsimple-template-names, which remove template parameters from the DW_AT_name of a type, if the full name can be reconstructed by using the template parameter names.

This PR add support for this option to drgn. If a type is templated, but its name doesn't contain the < character, we assume -gsimple-template-names was enabled and we need to reconstruct the full name.

@JakeHillion
Copy link
Owner

Squashed into facebookexperimental/object-introspection#418 as we don't have a mechanism for PRs on this repo yet (which probably makes sense given that I own it...).

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