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

Unify assignment command code #2129

Open
thestr4ng3r opened this issue Dec 21, 2021 · 4 comments · May be fixed by #4451
Open

Unify assignment command code #2129

thestr4ng3r opened this issue Dec 21, 2021 · 4 comments · May be fixed by #4451
Labels
good first issue Good for newcomers shell

Comments

@thestr4ng3r
Copy link
Member

thestr4ng3r commented Dec 21, 2021

There are multiple commands that handle assignments like e asm.arch=6502. Right now, they all use their own logic and syntax to parse this from argc/argv, but it will be better to have only one behavior and reuse it everywhere to be consistent.

Affected commands:

  • e
  • ar/dr
  • aezv
  • $
@ret2libc
Copy link
Member

What do you have in mind?
In e i'm just doing a split on =.

@thestr4ng3r
Copy link
Member Author

Doesn't really matter what the syntax exactly is, but the current state is:

  • e supports k=v but explicitly not k = v in favor of multiple assignments in one call
  • ar/dr support both k=v and k = v, but no multiple assignments
  • aezv does not handle = at all and only supports aezv k v

I would be ok with using either the e one or ar/dr one everywhere.

@XVilka XVilka added the good first issue Good for newcomers label May 15, 2022
@kazarmy
Copy link
Member

kazarmy commented Mar 24, 2024

I think $ is a special case (no multiple assignments), since whitespace by itself can't be used to separate or delimit between multiple assignments there.

@treseco
Copy link

treseco commented Apr 18, 2024

I've been looking at this, but I cannot seem to find the rz_analysis_regs_handler and the rz_debug_regs_handler definitions for ar and dr respectively, although they are both declared in rzlib/core/cmd_descs/cmd_descs.h. It would be appreciated if someone could point me to the right place, as I seem to be missing something related to the project structure here.

edit: found librz/core/cmd/cmd_regs_meta.inc, working on PR

@treseco treseco linked a pull request Apr 20, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers shell
Projects
Development

Successfully merging a pull request may close this issue.

5 participants