Skip to content

[Rebranch] Missing debug info fixes #7314

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

Conversation

felipepiovezan
Copy link

This PR contains two commits:

  1. Is a cherry-pick of https://reviews.llvm.org/D158185, which hasn't been merged yet upstream
  2. Is a temporary fix for another crash while I explore other solutions for it.

This should unblock building the concurrency library with debug info

…n producing DWARF

Fixes issues raised on: https://reviews.llvm.org/D133926

The patch above enabled using variadic-form debug values to represent single-location, non-stack-value debug values, and a further patch made all DBG_INSTR_REFs use variadic form. Not all code paths were updated correctly to handle the new syntax however, with entry values in still expecting an expression that begins exactly `DW_OP_LLVM_entry_value, 1`.

A function already exists to select non-variadic-like expressions; this patch adds an extra function to cheaply simplify such cases to non-variadic form, which we use prior to any entry-value processing to put DBG_INSTR_REFs and DBG_VALUEs down the same code path. We also use it for a few DIExpression functions that check for whether the first element(s) of a DIExpression match a particular pattern, so that they will return the same result for `DIExpression(DW_OP_LLVM_arg, 0, <ops>)` as for `DIExpression(<ops>)`.

Reviewed By: fdeazeve, Orlando

Differential Revision: https://reviews.llvm.org/D158185
@felipepiovezan felipepiovezan changed the title [Rebranch] [DoNotMerge] Missing debug info fixes [Rebranch] Missing debug info fixes Aug 25, 2023
@felipepiovezan felipepiovezan merged commit 72d3f2a into swiftlang:stable/20230725 Aug 25, 2023
@felipepiovezan felipepiovezan deleted the felipe/missing_rebranch_patches branch August 25, 2023 16:52
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.

1 participant