delve
delve copied to clipboard
Support call injection for functions that have type parameters
Please answer the following before submitting your issue:
Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.
If this is about source listing not showing up (or breakpoints not being accepted) while running in a container please read our FAQ first.
- What version of Delve are you using (
dlv version)? Version: 1.22.0 - What version of Go are you using? (
go version)? go version go1.21.5 darwin/arm64 - What operating system and processor architecture are you using? darwin/arm64
- What did you do?
When debugging in VSCode and calling a function in the evaluate expression, an error occurs.
Unable to evaluate expression: could not find symbol value for slices - What did you expect to see?
The
slices.Containscall returns normally. - What did you see instead?
Calling functions with type parameters is not supported and there are significant complications to implementing it: it's impossible to do it in the general case, where the instantiated version doesn't exist in the binary, (it would require debug time code generation) and when the instantiated version does exist it's still difficult because we have no way to find the right dictionary to pass.
Calling functions with type parameters is not supported and there are significant complications to implementing it: it's impossible to do it in the general case, where the instantiated version doesn't exist in the binary, (it would require debug time code generation) and when the instantiated version does exist it's still difficult because we have no way to find the right dictionary to pass.
Can it be achieved in the future? I used to do this kind of operation frequently in Python and Java before. It has caused me some troubles that I cannot do the same thing while debugging in Go.