debug/gosym: LineToPC doesn't work on macho files #51890
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying to use the
LineToPC
function in thegosym
package. This is my parsing code:https://go.dev/play/p/U1Rqy7nmrxd
You will have to use your own macho file to parse (pass to
getTable
) and fix the filename/lineno accordingly.The macho file I try to parse was built with this command:
go build -gcflags="-N -l" -o helloWorld main.go
What did you expect to see?
The pc for the given filename and lineno
What did you see instead?
The filename and line I pass exist, but the error I am getting is:
When I run the same code but try to parse an elf (I pass an elf to
getTable
), everything works as expected. The problem only occurs on macho files.The text was updated successfully, but these errors were encountered: