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

Refactor native debugger #4581

Open
wargio opened this issue Jul 27, 2024 · 8 comments · Fixed by #4604
Open

Refactor native debugger #4581

wargio opened this issue Jul 27, 2024 · 8 comments · Fixed by #4604
Assignees
Milestone

Comments

@wargio
Copy link
Member

wargio commented Jul 27, 2024

Currently the native debugger implemented in Rizin is a mess of #ifdef which always brings bugs each time is touched.
The idea behind this refactoring is to split all the native archs into files and just fill a structure with function pointers for each feature that the native debugger code needs.
This allows to cleanup the code and fix all weird behaviors in each OS.

  1. Split all the native OS code in its own file (Refactor native debugger #4604)
  2. Split all the native arch code for each OS in its own file (Refactor native debugger #4604)
  3. Ensure the current code is still working (even if bugged) in the same way. (Refactor native debugger #4604)
  4. Start patching all the various issues in the repo related to the native debugger.
@wargio wargio self-assigned this Jul 27, 2024
@wargio wargio added this to the 1.0.0 milestone Jul 27, 2024
@wargio
Copy link
Member Author

wargio commented Jul 27, 2024

Android and linux must be splitted in its own OS. also any unix compatible shared code can be copied and pasted multiple times.

@tushar3q34
Copy link
Contributor

Hey @wargio can you share a bit more about what file(s) are supposed to be changed ?
By reading the code, I think that the changes are targeted towards debug_native.c . Please correct me if I'm wrong.

@wargio
Copy link
Member Author

wargio commented Aug 28, 2024

That is correct. The issue is that the debugger is full of bugs and quite unreliable because one change in an arch, breaks another arch.
So the idea is to split more in depth the debugger and have os/arch
This way we can reuse the common api and implement whatever is arch specific

@tushar3q34
Copy link
Contributor

Ok thank you very much for the quick response. Can I start working on this issue ?

@wargio
Copy link
Member Author

wargio commented Aug 28, 2024

No need to ask for permission, go for it

@tushar3q34
Copy link
Contributor

Hello @wargio I am almost done with refactoring the code. Can you tell me how should I test my changes ? I have used meson test -C build.

@wargio
Copy link
Member Author

wargio commented Sep 2, 2024

Just open a PR and see what you break. Be sure your branch name starts with dist-

@wargio
Copy link
Member Author

wargio commented Sep 5, 2024

i would not close this since the last point is not done.

@wargio wargio reopened this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants