[angr] Storing data into StateHistory

Audrey Dutcher audrey at rhelmot.io
Tue Mar 27 18:01:38 PDT 2018


Hi! The easiest thing to do is probably to use history.add_event(name,
key1=val1, key2=val2)..., which will add a SimEvent to this list of events
for the step. Then, when iterating through state.history.events, you can
check event.type == name to match the events you've added, and then the
keys/vals you've provided will be in event.objects.

On Tue, Mar 27, 2018 at 7:37 AM, Cassius Puodzius <cpuodzius at gmail.com>
wrote:

> Hi all,
>
> I would like to store some data after each step and retrieve them through
> StateHistory afterwards. Is there any default interface/plugin to
> accomplished that?
> It should be similar to the globals plugin
> <https://docs.angr.io/docs/states.html> but for StateHistory instead.
>
> P.S.: I know I could add an attribute to the StateHistory object, but I
> would like to ask what is the most recommended way to do.
>
> Best regards,
> Cassius Puodzius
>
> _______________________________________________
> angr mailing list
> angr at lists.cs.ucsb.edu
> https://lists.cs.ucsb.edu/mailman/listinfo/angr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cs.ucsb.edu/pipermail/angr/attachments/20180327/3c638ab5/attachment.html>


More information about the angr mailing list