-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Clang does not generate DW_TAG_label #35768
Comments
I tried bisecting this but couldn't find any passing builds. Did we ever generate this TAG? |
I have only ever seen DW_TAG_label being generated for assembler sources. In assembler there is no notion of a function, only labels. |
Do you think generating a DW_TAG_label for C-language labels would be useful? |
I'd like to say yes, assuming that it's a prerequisite to be able to break on labels in the debugger. I don't know if LLDB supports this, but I'm pretty sure GDB does. |
Is it possible to distinguish user-specified labels from compiler-generated ones in LLVM IR and MIR? If yes, then this should be fairly straightforward to implement in AsmPrinter. |
@llvm/issue-subscribers-debuginfo
| | |
| --- | --- |
| Bugzilla Link | [36420](https://llvm.org/bz36420) |
| Version | trunk |
| OS | All |
| Attachments | [llvm-dwarfdump output for clang binary](https://user-images.githubusercontent.com/712896/143757064-9522842f-deb4-4d9c-b96d-fe39eebf7d47.gz), [llvm-dwarfdump output for gcc binary](https://user-images.githubusercontent.com/712896/143757065-c75ab33c-5cd9-44d7-8a94-306f4c84bb49.gz) |
| CC | @adrian-prantl,@JDevlieghere |
Extended Descriptionclang does not generate a DW_TAG_label for the example below, while gcc does: int main(int argc, char** argv) |
Extended Description
clang does not generate a DW_TAG_label for the example below, while gcc does:
int main(int argc, char** argv)
{
goto failure;
failure:
return 1;
}
The text was updated successfully, but these errors were encountered: