-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Feature Request: Print address of pointer as well as value #3446
Comments
You can also do: What should it look like in your opinion? Also should it only happen if the argument is a pointer or on every pointer? |
Could the output read:
Basically could the format for printing "pointer to a struct" be the same as the format used when delve doesn't recurse into a field (example I would think it would be simplest to implement and most consistent to use if this was how every pointer was printed, but there are probably design constraints that I'm not aware of. |
When printing a pointer variable first print the address that it points to before printing its dereferenced value. Fixes go-delve#3446
When printing a pointer variable first print the address that it points to before printing its dereferenced value. Fixes #3446
Thank you very much @aarzilli! |
Please answer the following before submitting your issue:
Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.
dlv version
)?go version
)?Linux amd64
During a debug session, I printed a pointer to a struct and got this:
I expected to see the address of the value pointed at somewhere in the output.
I have to type the following to see the address:
This is just an ergonomics issue. There are many instances of this struct within my program, and I want to know the address easily so that I can make sure I'm looking at the right one during a debug session. It seems like it should be relatively easy to include the address at the beginning or end of the struct output.
Thanks for all the hard work on delve!
The text was updated successfully, but these errors were encountered: