Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
Add documentation for angr.PointerWrapper(buffer=True) to migration g…
Browse files Browse the repository at this point in the history
…uide
  • Loading branch information
rhelmot committed Feb 4, 2022
1 parent baef71d commit afd62d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Here are the breaking changes:
### SimCCs can no longer be customized

If you were using the `sp_delta`, `args`, or `ret_val` parameters to SimCC, you should use the new class
`SimCCUsercall`, which lets (requires) you be explicit about the locations of each argument.
`SimCCUsercall`, which lets (requires) you to be explicit about the locations of each argument.

### Passing SimTypes is now mandatory

Expand All @@ -23,6 +23,14 @@ This has some fairly non-intuitive consequences - in order to accommodate more e
Additionally, some non-cc interfaces, such as `call_state` and `callable` and `SimProcedure.call()`, now _require_ a prototype to be passed to them.
You'd be surprised how many bugs we found in our own code from enforcing this requirement!

### PointerWrapper has a new parameter

Imagine you're passing something into a function which has a parameter of type `char*`.
Is this a pointer to a single char or a pointer to an array of chars?
The answer changes how we typecheck the values you pass in.
If you're passing a PointerWrapper wrapping a large value which should be treated as an array of chars, you should construct your pointerwrapper as `PointerWrapper(foo, buffer=True)`.
The buffer argument to PointerWrapper now instructs SimCC to treat the data to be serialized as an array of the child type instead of as a scalar.

### `func_ty` -> `prototype`

Every usage of the name func_ty has been replaced with the name prototype.
Expand Down

0 comments on commit afd62d5

Please sign in to comment.