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

starbind: fix Starlark slice unmarshaling #3454

Merged

Conversation

andreimatei
Copy link
Contributor

The unmarshaling code for slices wasn't actually setting the destination. This patch fixes it.

The unmarshaling code for slices wasn't actually setting the
destination. This patch fixes it.
@aarzilli
Copy link
Member

aarzilli commented Aug 6, 2023

LGTM thank you

@aarzilli
Copy link
Member

aarzilli commented Aug 7, 2023

Are you using the scripting engine for something?

If your using it I'm curious what you think about this: I've been thinking about moving starlark evaluation server side for a while (#2887) this would make it faster and allow for it to be used for more things (pretty printing, breakpoint conditions), OTOH it wouldn't be possible to invoke command line commands (i.e. dlv_command).

@andreimatei
Copy link
Contributor Author

Hi Alessandro!
I've been using the scripting engine for the past few weeks to prototype a debugging product. Delve is probably not what I'll ultimately use, but rather some dynamic instrumentation techniques like BPF (for the sake of speed of the instrumented binary). Still, prototyping with Delve is immensely useful.
I've hacked Delve to allow running scripts when breakpoints are hit, and I've also added my own RPC that stops the target and runs a custom script. For example, I have a script that walks all the stacks and recognizes certain frames. I could clean up and upstream this support for running scripts in more contexts, if you're interested. Depending on what exactly you mean by moving script evaluation "server side", I may have already hacked it.

#2887 talks specifically about pretty-printing, which is something that I've also been thinking a lot about. Besides Starlark, I'm wondering if you've considered ways to directly invoke String() methods on the respective type (for example through general the support Delve already has for invoking function from the target).

@derekparker
Copy link
Member

Hi Alessandro! I've been using the scripting engine for the past few weeks to prototype a debugging product. Delve is probably not what I'll ultimately use, but rather some dynamic instrumentation techniques like BPF (for the sake of speed of the instrumented binary).

Delve does also have the ability to set eBPF probes, any help with regard to support there would be great if you're interested!

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekparker derekparker merged commit ae67a45 into go-delve:master Aug 7, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants