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
This is complicated. We're just printing the name of the type that's in debug_info, to remove those prefixes we'd have to parse that string and strip them. Unfortunately there's no parser for that (it looks like go, but it isn't valid go, obviously) and no formal grammar (besides the code that outputs them, somewhere in the compiler).
The name in debug_info comes from the name of the type symbol produced by the compiler, we can't change the way the compiler generates that name because it probably has a good reason to include that prefix (or maybe not? I don't know for sure). We could regenerate the name in the linker when debug_info is written but that's probably expensive and complex.
Parsing and stripping them in the debugger is probably the least-wrong answer, but I'm not sure we want all that extra complexity for a cosmetic improvement.
This doesn't seem to have bothered anyone, it doesn't usually come up and the added complexity for the cosmetic fix is high. It seems we shouldn't implement it.
dlv version
)?built on commit ac3b1c7
go version
)?go version go1.12 linux/amd64
linux/amd64
Printed the value of the
t
variable once the program reached a breakpoint:It's type presented like this
struct { a string }
It's type presented like this
struct { main.a string }
Notice the redundant package name prefix in the field.
Rpc log:
The text was updated successfully, but these errors were encountered: