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

Convert pv commands to rzshell #3069

Merged
merged 1 commit into from
Oct 11, 2022
Merged

Convert pv commands to rzshell #3069

merged 1 commit into from
Oct 11, 2022

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Oct 7, 2022

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

  • Convert pv commands to rzshell
  • Removed pV commands that are same as pv but with useBytes == true. No tests exists for those
  • Removed pvz commands as undocumented and untested

Test plan

CI is green

Closing issues

Partially solves #1590

@github-actions github-actions bot added the RzCore label Oct 7, 2022
@XVilka XVilka force-pushed the asan-print-rzshell branch 3 times, most recently from 2b9dc19 to 8b88b47 Compare October 7, 2022 06:01
@ret2libc ret2libc self-assigned this Oct 7, 2022
@wargio

This comment was marked as resolved.

librz/core/cmd_descs/cmd_print.yaml Show resolved Hide resolved
librz/core/cmd_descs/cmd_print.yaml Show resolved Hide resolved
librz/core/cmd/cmd_print.c Outdated Show resolved Hide resolved
librz/core/cmd/cmd_print.c Outdated Show resolved Hide resolved
librz/core/cmd/cmd_print.c Outdated Show resolved Hide resolved
Comment on lines +6456 to +6491
ut8 *block = core->block;
int blocksize = core->blocksize;
ut8 *block_end = core->block + blocksize;

if (block + 8 >= block_end) {
RZ_LOG_ERROR("core: block is truncated.\n");
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

I think the block concept can be removed and we can use rz_io_nread_at instead. In any case, we can probably avoid the rz_core_seek in the do/while loop below and just keep track of at manually (you can use ps @ {addr} in the print_value_single function).

Copy link
Member Author

Choose a reason for hiding this comment

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

I would prefer to postpone this until converting to the API calls, after ps are converted to the rzshell and a better API.

@XVilka XVilka added this to the 0.5.0 milestone Oct 8, 2022
@XVilka XVilka requested review from wargio and ret2libc October 9, 2022 17:18
@XVilka XVilka mentioned this pull request Oct 9, 2022
32 tasks
@XVilka XVilka force-pushed the asan-print-rzshell branch 2 times, most recently from bd554a0 to 93050fb Compare October 11, 2022 00:13
Copy link
Member

@ret2libc ret2libc left a comment

Choose a reason for hiding this comment

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

LGTM once that last comment is fixed.

librz/core/cmd/cmd_print.c Outdated Show resolved Hide resolved
@XVilka XVilka merged commit 3479a9b into dev Oct 11, 2022
@XVilka XVilka deleted the asan-print-rzshell branch October 11, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants