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

VM CLI: set ip #2606

Closed
ixje opened this issue Jul 20, 2022 · 2 comments · Fixed by #2740
Closed

VM CLI: set ip #2606

ixje opened this issue Jul 20, 2022 · 2 comments · Fixed by #2740
Labels
cli Command line interface enhancement Improving existing functionality
Milestone

Comments

@ixje
Copy link
Contributor

ixje commented Jul 20, 2022

I think it could be useful to have a command that allows for setting the instruction pointer. Right now you can load a nef, but run will always execute whatever function or code is at offset 0 (obviously). Having the ability to set the instruction pointer we could at least call some other functions (the offset can be grabbed from the manifest). Of course it's still limited to functions without arguments but that could be all you need sometimes.

@roman-khimov roman-khimov added the cli Command line interface label Jul 29, 2022
@roman-khimov roman-khimov added the enhancement Improving existing functionality label Sep 9, 2022
@roman-khimov roman-khimov added this to the v0.99.5 milestone Oct 6, 2022
@roman-khimov
Copy link
Member

@AnnaShaleva, IIUC run method works now even with 0.99.4? Arbitrary jumps can be useful anyway though.

@AnnaShaleva
Copy link
Member

run method works now even with 0.99.4

Yes, it works.

Of course it's still limited to functions without arguments

Also, run method is able to parse arguments, e.g. run method arg1 arg2 .... After #2740 arguments parsing will work exactly as contract testinvokefunction works.

Arbitrary jumps can be useful anyway though.

I'll add some move or jmp command for this.

AnnaShaleva added a commit that referenced this issue Oct 12, 2022
AnnaShaleva added a commit that referenced this issue Oct 12, 2022
AnnaShaleva added a commit that referenced this issue Oct 12, 2022
AnnaShaleva added a commit that referenced this issue Oct 13, 2022
AnnaShaleva added a commit that referenced this issue Oct 17, 2022
AnnaShaleva added a commit that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command line interface enhancement Improving existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants