You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executed "objdump -sj .debug_gdb_scripts demo". the contents of section .debug_gdb_scripts should be "$GOROOT/src/runtime/runtime-gdb.py".
like this:
What did you see instead?
Sometimes, the contents of section .debug_gdb_scripts is as follows:
Reason
in the linking procedure:
the final value of the variable “gdbscript” will not be unique any more, if the project contains another file named like "XXXruntime/proc.go".
The whole process is executed by different go-routines as follows:
the variable “gdbscript” was assigned in the function "writeDirFileTables" which is executed by different goroutines in parallel .
if another file whose name ended with "runtime/proc.go" (not "$GOROOT/src/runtime/proc.go") was found firstly, the final value of the variable “gdbscript” will not be "$GOROOT/src/runtime/runtime-gdb.py".
Please don't send plain text as images. Please just use plain test. Images are much harder to read. Thanks.
Sorry. I rewrote it in text format.
What did you expect to see?
When executed "objdump -sj .debug_gdb_scripts demo". the contents of section .debug_gdb_scripts should be "$GOROOT/src/runtime/runtime-gdb.py".
like this:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
YES. This issue reproduced with 1.17 and earlier.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
demo/demo.go:
demo/fakeruntime/proc.go
What did you expect to see?
When executed "objdump -sj .debug_gdb_scripts demo". the contents of section .debug_gdb_scripts should be "$GOROOT/src/runtime/runtime-gdb.py".
like this:
What did you see instead?
Sometimes, the contents of section .debug_gdb_scripts is as follows:
Reason
in the linking procedure:
the final value of the variable “gdbscript” will not be unique any more, if the project contains another file named like "XXXruntime/proc.go".
The whole process is executed by different go-routines as follows:
the variable “gdbscript” was assigned in the function "writeDirFileTables" which is executed by different goroutines in parallel .
if another file whose name ended with "runtime/proc.go" (not "$GOROOT/src/runtime/proc.go") was found firstly, the final value of the variable “gdbscript” will not be "$GOROOT/src/runtime/runtime-gdb.py".
the code is as follows:
go/src/cmd/link/internal/ld/dwarf.go
Line 1193 in 6e50991
The text was updated successfully, but these errors were encountered: