Add NetBSD debug tests and fix errors
Your checklist for this pull request
- [x] I've read the guidelines for contributing to this repository.
- [x] I made sure to follow the project's coding style.
- [ ] I've documented every
RZ_APIfunction and struct this PR changes. - [x] 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).
Detailed description
- Added netbsd x86_64 register profile so that the registers are assigned correct values and hence the
core->offset, this would show the correct address in the rizin prompt instead of 0x000 for netbsd in debugger mode. - Fixed
native_waitfunction in netbsd.c to use the correct reason instead of assigning RZ_DEBUG_REASON_TRAP and correctly show prompt if process is exited. - The netbsd attach function just ignored if the ptrace failed (which it would because the debugee is attached from fork and trace), so instead added proper error handling.
- added some netbsd tests, used the binary files that xvilka had pushed in rizin-testbins earlier.
Test plan
rz-test test/db/archos/netbsd-x64 CI is green
Closing issues
closed #3274 and partially #3072
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 44.54%. Comparing base (
9f17373) to head (e9f0aac).
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| librz/debug/debug.c | 43.69% <ø> (-0.41%) |
:arrow_down: |
... and 8 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 dataPowered by Codecov. Last update 9f17373...e9f0aac. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Ignore the comment about breakpoints - I see they are part of one test
Have tweaked some tests to check how they are working, will fix rz-test accordingly