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

Python scripting #507

Open
eteran opened this Issue Dec 14, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@eteran
Owner

eteran commented Dec 14, 2016

I'd like to have a plugin which can run a user supplied python script. The scripts don't need to have access to the entire edb plugin API. We can probably get away with (for starters):

get/set register state, read/write memory, list of memory regions, maybe a PyQt reference to the MainWindow

which would allow some basic analysis from any scripts, and do some possible integration with the GUI. From there, we can make the python code gain features that the normal plugin API has on a piecemeal basis.

@eteran eteran added the enhancement label Dec 14, 2016

@AaronOpfer

This comment has been minimized.

Show comment
Hide comment
@AaronOpfer

AaronOpfer Dec 14, 2016

Contributor

I like this idea! I think we should embrace the future and support Python3 only.

Another option is to have some sort of IPC server which can do request/responses to edb, then users can script it however they want, and we can provide 'official' libs. Although that sounds suspiciously like gdbserver.

Contributor

AaronOpfer commented Dec 14, 2016

I like this idea! I think we should embrace the future and support Python3 only.

Another option is to have some sort of IPC server which can do request/responses to edb, then users can script it however they want, and we can provide 'official' libs. Although that sounds suspiciously like gdbserver.

@eteran

This comment has been minimized.

Show comment
Hide comment
@eteran

eteran Dec 14, 2016

Owner

Yea, I'm fine with going Python3 only. If someone REALLY wants Python2 support, they are free to hack that into the plugin. I honestly think the difference will be almost entirely in what version of libpyton we compile against.

Adding general remote control to edb is also interesting, I think that if we wanted to this, Qt's implementation of DBUS may be the way to do it, I'm not 100% sure though. For now, I think a simply scripting plugin will do, and we'll see about a more generalized approach sometime in the future.

Owner

eteran commented Dec 14, 2016

Yea, I'm fine with going Python3 only. If someone REALLY wants Python2 support, they are free to hack that into the plugin. I honestly think the difference will be almost entirely in what version of libpyton we compile against.

Adding general remote control to edb is also interesting, I think that if we wanted to this, Qt's implementation of DBUS may be the way to do it, I'm not 100% sure though. For now, I think a simply scripting plugin will do, and we'll see about a more generalized approach sometime in the future.

@AaronOpfer

This comment has been minimized.

Show comment
Hide comment
@AaronOpfer

AaronOpfer Dec 15, 2016

Contributor

It looks like we would need to use Python Stable ABI. If we do that then we should be able to make our binaries happy with a system libpython or a conda environment python.

Contributor

AaronOpfer commented Dec 15, 2016

It looks like we would need to use Python Stable ABI. If we do that then we should be able to make our binaries happy with a system libpython or a conda environment python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment