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

Support call injection for functions that have type parameters #3629

Open
crowod opened this issue Jan 13, 2024 · 2 comments
Open

Support call injection for functions that have type parameters #3629

crowod opened this issue Jan 13, 2024 · 2 comments

Comments

@crowod
Copy link

crowod commented Jan 13, 2024

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.

  1. What version of Delve are you using (dlv version)?
    Version: 1.22.0
  2. What version of Go are you using? (go version)?
    go version go1.21.5 darwin/arm64
  3. What operating system and processor architecture are you using?
    darwin/arm64
  4. 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
  5. What did you expect to see?
    The slices.Contains call returns normally.
  6. What did you see instead?
image
@aarzilli aarzilli changed the title Unable to evaluate expression: could not find symbol value for 'xxx' Support call injection for functions that have type parameters Jan 13, 2024
@aarzilli
Copy link
Member

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.

@crowod
Copy link
Author

crowod commented Jan 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants