-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/link: Add DW_AT_decl_line for DW_TAG_subprogram in DWARF table #57308
Comments
cc @cherrymui @thanm |
I am fairly certain that adding new DWARF data does not require the proposal process. Removing. |
@hoeppi-google is this attribute needed for subprogram corresponding to abstract functions? Or only regular DW_TAG_subprogram entries corresponding to vanilla functions? |
discussed this offline with @prattmic , sounds like we need abstract function support as well. |
Change https://go.dev/cl/457696 mentions this issue: |
Change https://go.dev/cl/458195 mentions this issue: |
DW_AT_decl_line provides the line number of function declarations (the line containing the func keyword). This is the equivalent to CL 429638, but provided via DWARF. Note that the file of declarations (DW_AT_decl_file) is already provided for non-inlined functions. It is omitted for inlined functions because those DWARF subprograms may be generated outside of their source compilation unit, where referencing the file table is difficult. Fixes golang#57308. Change-Id: I3ad12e1f366c4465c2a588297988a5825ef7efec Reviewed-on: https://go-review.googlesource.com/c/go/+/458195 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Michael Pratt <[email protected]> Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
Currently, the DWARF table does not contain DW_AT_decl_line in the DW_TAG_subprogram entries, i.e. the source code line number of the function definition is not listed in the DWARF entry of said function. I propose to add this information to the DWARF table.
DW_AT_decl_line of functions is needed to convert absolute line numbers into relative line numbers w.r.t. to the first line of the function from DWARF information. Such information is useful in the context of PGO.
CC @aclements
The text was updated successfully, but these errors were encountered: