-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Change -, --, = argument and = command meaning #930
Conversation
Previos PRs are: |
So Sorry, and I know . |
@seanachao And also, |
@seanachao Why do you close this PR again? O_O |
I think this pr is not right, so I close it again,so sorry. If I want to commit agin, what should I do? |
|
Just force-push to the branch: |
Okay, thanks! |
This comment has been minimized.
This comment has been minimized.
@seanachao @wargio Please try to give PRs a descriptive tittles so that developers looking at the PR list can get basic understanding of what kind of changes are inside. "Fix #nnnn" without any additional information isn't very useful either since I doubt anyone can remember all the issue numbers and issue numbers in PR tittle are not automatically converted to links. |
@karliss okey, I added the title of the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for =
in cmd_descs.yaml
.
I've added to the comment0 some things to try as tests, mentioned in the referenced issues. I'm not sure yet if automatic tests were added for those, but they should be tested manually before approving this. |
And I don't think this is a good git commit here. You probably messed up something locally (e.g. run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wait until @ret2libc take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- in
rizin -h
:-= perform !=! command to run all commands remotely
this should probably beR=!
./build-change-args/binrz/rizin/rizin - -c "ie"
should this work or give out an error? not sure- in
rizin -h
:-C file is host:port (alias for -c+=http://%s/cmd/)
should probably be-cR+ .....
- grep for
=!=
and!=!
and replace them as appropriate (also inscanner.c
) - grep for
=!
and replace it withR!
as appropriate (e.g. inlibrz/io/p/io_rap.c
and others) - grep for
=h
and replace withRh
as appropriate (e.g. inlibrz/core/rtr_http.c
) | Rh port listen for http connections (rizin -qc=H /bin/ls)
should probably becRH /bin/ls
| R&r <port> # Start rap server in background (same as '&_=h')
not sure where that&_=h
came from, but it seems definitely wrong- not only related to your PR, but could you fix
librz/core/rtr.c:rz_core_rtr_cmd()
because it still looks for=:
and=&:
instead ofRr
andR&r
/Rh&
.
@ret2libc thanks for your comments, And I have some doubts.
|
I did some changes in the past to these commands names as well, so probably there were a series of changes and somehow that string was forgotten and partially changed. I think this should be
@XVilka @caribpa do you have any advice here? I would expect invalid combinations of argument flags to fail early and hard, instead of doing "something". |
Absolutely agree, it should be an error message. 👍 @seanachao please also rebase against the latest |
f251bea
to
a916da8
Compare
Seems like it broke tree-sitter parser cc @ret2libc
|
@seanachao in scanner.c there is: static bool is_equal_cmd(const char *s) {
return s[0] == '=';
}
static bool is_mid_command(const char *res, int len, const int32_t ch) {
.....
return iswalnum (ch) || ch == '$' || ch == '?' || ch == '.' || ch == '!' ||
ch == ':' || ch == '+' || ch == '=' || ch == '/' || ch == '*' ||
ch == '-' || ch == ',' || ch == '&' || ch == '_' ||
(is_interpret_cmd (res) && ch == '(') ||
(is_equal_cmd (res) && ch == '<') || (is_at_cmd (res) && ch == '@');
} Please rename |
e6f98c6
to
c8b385a
Compare
|
shouldn't it now be |
@seanachao also:
Before it was working. By the way, let me tell you that this is really a great job and sorry for the many different changes you are requested, but the more things you modify, the more things need to be checked. Anyway, I think you are missing just few details! Thanks again for all this! |
Is there a test for this situation specifically?
I scrolled the changes and haven't seen a new test for this in |
@XVilka @ret2libc, the test I haven't add , when my test json such as this
the test cmd is
how could I modify the test json to get the test cmd like
|
@ret2libc , For Rr wasn't woring, when I try to resolve the question
I use 'r' to replace ':' ,so Rr wasn't working , do you have any advice to fix rz_core_rtr_cmd()
|
Good point. I think it is not possible right now... @thestr4ng3r is it? |
Ok..... I realize just now things are really messy and probably it's better to just rewrite most of those things with newshell in mimd, in the future. For now, just revert that change with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, good work!! Thanks a lot for all the changes. I think it's ready now. I've tried it a bit and it seems to work fine. I think there is still some adjustments to do on the remote part, but we can probably do it in a separate PR that will be easier to review/smaller.
Thanks again!
Your checklist for this pull request
Detailed description
...
Test plan
From #615:
rizin
rizin --
rizin -test
rizin -- -test
rizin -d -- -test
From #616:
rizin =
rizin - < test/bins/elf/ls
for the test
Closing issues
Fix #616 Swap - (single dash) and = (equal sign) meaning
Fix #615 -- (double dash) should be treated as "end of flags" | Allow launching Rizin without a
...