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

[lldb/DWARF] Remove parsing recursion when searching for definition DIEs #96484

Merged
merged 2 commits into from
Jun 25, 2024

Commits on Jun 24, 2024

  1. [lldb/DWARF] Remove parsing recursion when searching for definition DIEs

    If ParseStructureLikeDIE (or ParseEnum) encountered a declaration DIE,
    it would call FindDefinitionTypeForDIE. This returned a fully formed
    type, which it achieved by recursing back into ParseStructureLikeDIE
    with the definition DIE.
    
    This obscured the control flow and caused us to repeat some work (e.g.
    the UniqueDWARFASTTypeMap lookup), but it mostly worked until we tried
    to delay the definition search in llvm#90663. After this patch, the two
    ParseStructureLikeDIE calls were no longer recursive, but rather
    the second call happened as a part of the CompleteType() call. This
    opened the door to inconsistencies, as the second ParseStructureLikeDIE
    call was not aware it was called to process a definition die for an
    existing type.
    
    To make that possible, this patch removes the recusive type resolution
    from this function, and leaves just the "find definition die"
    functionality. After finding the definition DIE, we just go back to the
    original ParseStructureLikeDIE call, and have it finish the parsing
    process with the new DIE.
    
    While this patch is motivated by the work on delaying the definition
    searching, I believe it is also useful on its own.
    labath committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    52db8db View commit details
    Browse the repository at this point in the history
  2. update dietotype

    labath committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    683d881 View commit details
    Browse the repository at this point in the history