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

Separate the events API for plugins #256

Open
emoon opened this issue Jul 20, 2016 · 1 comment
Open

Separate the events API for plugins #256

emoon opened this issue Jul 20, 2016 · 1 comment

Comments

@emoon
Copy link
Owner

emoon commented Jul 20, 2016

Right now plugins can request data from the backend and then get back an event of the request. The idea with the current design is that anyone can listen to any events which is useful in some cases but mostly actually not. This design leads to some problems:

  • When a plugin makes a request it doesn't get a confirmation that the request has failed or not. Say requesting memory that wasn't able to be read.
  • As requests are global that means there is hard to tell the difference between between requests of the same time (say that two memory views requests different chunks of data)

Suggestion is to:

  • Still keep events. Events would be things like set_exception_location, step, break and requests would be more of the type request_memory, request_disassembly, etc
  • Remove the "action" variable being sent to the plugins, move that over to events instead.
  • Requests should be more RPC like with getting a replay back whatever the request completed or not.
@emoon
Copy link
Owner Author

emoon commented Aug 25, 2016

I suggest an temporary approach for now as this will become an issue otherwise before 0.1

  1. When doing begin_event a handle will be returned. (u64) in some cases this handle makes sense to use and some it doesn't
  2. When someone replies to an event (get_memory/set_memory) set memory needs to supply back the id again to so that the requester can check for the correct id. Id can retrieved as get_u64("request_id")

This is by far not the best way to do it but I think it will work until we have something more robust in place.

cc @SlNPacifist

@emoon emoon mentioned this issue Sep 3, 2016
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

No branches or pull requests

1 participant