Skip to content

Conversation

@Arya-1-HR
Copy link
Contributor

@Arya-1-HR Arya-1-HR commented Jan 18, 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

The int mode types are replaced with the RzOutputMode mode type in the below file , this PR also removes the hardcoded macro's used instead of RzOutputMode mode

/librz/core/cbin.c
/librz/main/rz-bin.c

Test plan

All existing test passes

Closing issues

closes #489

Copy link
Contributor

@notxvilka notxvilka left a comment

Choose a reason for hiding this comment

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

Nice, finally we are close to eliminating old modes completely!

@Arya-1-HR Arya-1-HR marked this pull request as ready for review January 18, 2026 19:34
@Arya-1-HR Arya-1-HR requested a review from notxvilka January 18, 2026 19:34
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 62.93103% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.69%. Comparing base (d0a0b6e) to head (43b48ae).

Files with missing lines Patch % Lines
librz/core/cbin.c 59.79% 34 Missing and 5 partials ⚠️
librz/main/rz-bin.c 83.33% 1 Missing and 2 partials ⚠️
librz/core/tui/classes.c 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
librz/include/rz_types.h 38.09% <ø> (ø)
librz/core/tui/classes.c 0.00% <0.00%> (ø)
librz/main/rz-bin.c 58.21% <83.33%> (-0.35%) ⬇️
librz/core/cbin.c 64.64% <59.79%> (-0.54%) ⬇️

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0a0b6e...43b48ae. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Arya-1-HR Arya-1-HR requested a review from Rot127 January 19, 2026 18:02
Copy link
Member

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

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

Sorry, forgot to check the other two.

@Arya-1-HR Arya-1-HR marked this pull request as draft January 23, 2026 10:56
@Arya-1-HR Arya-1-HR marked this pull request as ready for review January 24, 2026 19:12
@Arya-1-HR Arya-1-HR requested a review from Rot127 January 25, 2026 15:26
Copy link
Member

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

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

@wargio @notxvilka I would suggest to reduce this PR only to the RZ_OUTPUT_MODE_ part and do the stuff about exporting of some info in another one.

}

/**
* \brief Export binary information from sdb to the core environment in set mode.
Copy link
Member

Choose a reason for hiding this comment

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

Please describe in more detail what the function actually does.
I'd recommend to use a debugger and step through it.
E.g. Exports what? Exports to where? Exports from what? Sets what and where.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

*
* \param core A non null Pointer to the RzCore instance
*/
RZ_API void rz_core_bin_print_format(RZ_NONNULL RzCore *core) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the github search is broken again, but this function seems unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As told I split the function into two and added a unit test , This functionality was used at rz-bin and was removed discussed in here
#discussion_r270505050

@Arya-1-HR Arya-1-HR requested a review from Rot127 February 1, 2026 18:59
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.

Refactor output modes to use enum

4 participants