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

cmd/compile: DWARF inlined function call line not adjusted by //line #58648

Closed
prattmic opened this issue Feb 22, 2023 · 2 comments
Closed

cmd/compile: DWARF inlined function call line not adjusted by //line #58648

prattmic opened this issue Feb 22, 2023 · 2 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

The DW_AT_call_line of DW_TAG_inlined_subroutine is not adjusted by //line directives (https://cs.opensource.google/go/go/+/master:src/cmd/compile/internal/dwarfgen/dwinl.go;l=282;drc=322879d5c9dc34975a42ac77fbef7b4a8b255e8a should use RelLine, not Line). On the other hand, DW_AT_call_file is adjusted by //line.

We should adjust for //line, as the other DWARF line numbers do.

@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 22, 2023
@prattmic prattmic added this to the Go1.21 milestone Feb 22, 2023
@prattmic prattmic self-assigned this Feb 22, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 22, 2023
@gopherbot
Copy link

Change https://go.dev/cl/470875 mentions this issue: cmd/link/internal/ld: split TestInlinedRoutineRecords

@gopherbot
Copy link

Change https://go.dev/cl/470876 mentions this issue: cmd/compile: adjust inlined DW_AT_call_line by //line

gopherbot pushed a commit that referenced this issue Feb 23, 2023
A later CL will add additional test cases for CallFile and CallLine with
a //line directive. The parameter/variable checks have nothing to do
with line numbers and will only serve to make the test more difficult to
follow, so split this single mega-test into two: one for testing
file/line and the other for testing parameters/variables.

There are a few additional minor changes:

1. A missing AttrName is now an error.
2. Check added for AttrCallLine, which was previously untested.

For #58648.

Change-Id: I35e75ead766bcf910c58eb20541769349841f2b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/470875
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
@golang golang locked and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants