Skip to content

Conversation

@wargio
Copy link
Member

@wargio wargio commented Jan 16, 2026

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 every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

Should replace the whole RzIO layer and most of the RzIO handlers should be translated in RzBuffer equivalents

#endif

typedef enum {
RZ_MEMORY_VISIBILITY_HIDDEN = 0,
Copy link
Member

Choose a reason for hiding this comment

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

hidden means: region is completely covered by another memory region?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@Rot127
Copy link
Member

Rot127 commented Jan 16, 2026

One requirement I would have is for the behavior of reading. It should be configurable. By passing a flag or something.

enum {
  FIXED_BLOCK, ///< Reads the requested number of bytes. If it reads less than the request number of bytes, the read fails.
  UP_TO, ///< Reads up to the number of requested bytes. If it reads less than that, the read still succeeds.
  AT_LEAST, ///< The number of requested bytes is the minimum bytes which must be read. Otherwise the read fails.
} RzMemReadBehvior;

I am so so annoyed about hour inconsistent and complicated reading behavior.
Having control over it would be a blessing.

@Rot127
Copy link
Member

Rot127 commented Jan 16, 2026

Also, keep in mind that RzBuffer can't properly handle addresses above ST64_MAX.

@wargio
Copy link
Member Author

wargio commented Jan 17, 2026

Also, keep in mind that RzBuffer can't properly handle addresses above ST64_MAX.

i forgot about that!

@wargio
Copy link
Member Author

wargio commented Jan 17, 2026

One requirement I would have is for the behavior of reading. It should be configurable

i can replace the bool sparse arg with this enum.

@wargio
Copy link
Member Author

wargio commented Jan 17, 2026

isn't FIXED_BLOCK and AT_LEAST the same? because otherwise i would need to define an extra variable to say min x bytes and max x bytes

@Rot127
Copy link
Member

Rot127 commented Jan 19, 2026

isn't FIXED_BLOCK and AT_LEAST the same? because otherwise i would need to define an extra variable to say min x bytes and max x bytes

Ah yes, sorry. It was late while writing this.

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