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

WIP Python arch plugin #40

Merged
merged 3 commits into from
Apr 26, 2024
Merged

WIP Python arch plugin #40

merged 3 commits into from
Apr 26, 2024

Conversation

astuder
Copy link
Contributor

@astuder astuder commented Apr 24, 2024

Checklist

  • Closing issues: #issue
  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some documentation

Description

Adding support for arch plugins to the Python plugin interface.

So far only implements decode (disassembling).

Copy link
Contributor

@trufae trufae left a comment

Choose a reason for hiding this comment

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

Looks good overall. Ill merge after fixing those little things. Encoding should be easy to implement too

python/python/arch.c Outdated Show resolved Hide resolved
python/examples/test-py-arch.py Outdated Show resolved Hide resolved
#
# The r2lang.plugin function exposes a way to register new plugins
# into the RCore instance. This API is only available from RLang.
# You must call with with '#!python test.py' or 'r2 -i test.py ..'
Copy link
Contributor

Choose a reason for hiding this comment

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

Better use -I to load earlier

the resr of comments can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied that from the other examples. Would be nice if -a would run after the plugin is loaded, but no difference between -i and -I for that.

python/examples/test-py-arch.py Outdated Show resolved Hide resolved
python/python/arch.c Show resolved Hide resolved
python/python/arch.c Outdated Show resolved Hide resolved
python/python/arch.c Outdated Show resolved Hide resolved
python/python/arch.h Outdated Show resolved Hide resolved
@trufae trufae merged commit b459aa6 into radareorg:master Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants