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

[Idea] Instrumentation Framework #9

Open
offlinemark opened this issue Dec 13, 2015 · 5 comments
Open

[Idea] Instrumentation Framework #9

offlinemark opened this issue Dec 13, 2015 · 5 comments

Comments

@offlinemark
Copy link
Collaborator

i think it could be cool to explore this idea of an instrumentation framework for bf. like being able to register callbacks not just after each step, but like before and after interpretation, before and after the instruction itself, on certain types of instructions, maybe even on ub. you could then use that to write analysis tools, for example

i'm basically thinking of doing something in the spirit of pin (https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool)

@nixpulvis
Copy link
Owner

This mostly boils down to extending the hook capabilities, and then writing some statistics hooks right?

@offlinemark
Copy link
Collaborator Author

yeah pretty much

@nixpulvis nixpulvis changed the title [idea] Instrumentation Framework [Idea] Instrumentation Framework Dec 13, 2015
nixpulvis added a commit that referenced this issue Dec 15, 2015
@nixpulvis
Copy link
Owner

I added the -i option, but it could clearly do more. What kinds of things are you thinking for this?

@offlinemark
Copy link
Collaborator Author

I guess this doesn't really make sense since bf is so minimal.

My initial thoughts were for this use case: you have a brainfuck program and you want to get certain statistics on its execution. You implement some hook functions, compile it into a shared object and then give that to the interpreter. Then at runtime, the interpreter loads the .so and calls those hooks at certain stages we support.

@nixpulvis
Copy link
Owner

I like the idea of playing with some dynamic loading of symbols. Good exercise.

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

2 participants