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

fix(debuginfo): Patch all parent line records of inlinees in DWARF #223

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Apr 22, 2020

An inline function can have multiple parent line records that cover ranges of the inlinee. This PR fixes three cases:

  1. Patch all line records in the parent that cover the range
  2. If the start record overlaps, truncate it to the start of the inlinee
  3. If the end record exceeds the inlinee, insert a new one and truncate the other.

Before patching:

                  +-------+---+-------+
         Parent:  |   P   | I |   P   |
                  +---+-----------+---+
        Inlinee:      | I | I | I |
                      +---+---+---+

After patching:

                  +---+---+---+---+---+
         Parent:  | P | C | C | C | P |
                  +-------------------+
        Inlinee:      | I | I | I |
                      +---+---+---+

(P parent line record, C Call site record, I inlinee line record)

@jan-auer jan-auer requested review from mitsuhiko and a team April 22, 2020 15:08
@jan-auer jan-auer self-assigned this Apr 22, 2020
@mitsuhiko mitsuhiko merged commit d16bc47 into master Apr 22, 2020
@mitsuhiko mitsuhiko deleted the fix/inline-parent-lines branch April 22, 2020 18:02
jan-auer added a commit that referenced this pull request Apr 22, 2020
* master:
  fix(symcache): Use same instruction address for full lookup (#226)
  feat(examples): Add a naive addr2line example (#222)
  fix(build): Broken compilation with -Clink-dead-code (#225)
  fix(debuginfo): Patch all parent line records of inlinees in DWARF (#223)
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.

None yet

2 participants