1
0
mirror of https://github.com/angr/pyvex synced 2026-06-21 13:47:01 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
Kevin Phoenix 5f952aff37 Use pre-commit 2023-01-17 14:47:17 -07:00
Kevin Phoenix 23503e7919 Use black (#291)
* Use black

* Fix the lint error
2023-01-13 14:23:57 -07:00
Zachary Wimer cd758543f1 Code Quality: trailing whitespace, pyupgrade, prefer builtin constructors (#288)
* trailing whitespace, pyupgrade, prefer builtin constructors

* lint
2022-12-20 21:12:37 -07:00
Audrey Dutcher 09c037ac2d Do expression replacements all at once rather than one at a time (#281)
* Do expression replacements all at once rather than one at a time; closes #3407

* one more
2022-06-24 16:05:20 -07:00
Fish 91e5e27b80 Use cryptographically insecure but faster and stable hashes for popular classes. (#251) 2022-01-01 13:24:56 -07:00
Florian Magin ff45dd5dc9 Revert "Get rid of type aliases from archinfo." (#211)
This reverts commit 2644390680.

Co-authored-by: Florian Magin <fmagin@users.noreply.github.com>
2020-05-06 20:22:50 -07:00
Fish 2644390680 Get rid of type aliases from archinfo. 2020-05-06 09:27:39 -07:00
Florian Magin a4413e4942 Type Annotations for pyvex (#198)
* Add PEP 561 py.typed file

* Various type initial annotations

* Move all the type aliases to top level __init__

* Type Ist_Store constructor

* Add RegisterName TypeAlias

* Minor annotations

* Fix linting issues

* Move type aliases from pyvex to archinfo
2020-01-25 15:51:19 -07:00
Audrey Dutcher 4296c9a4c8 tiny fixes 2019-12-06 11:28:59 -08:00
Saullo Carvalho Castelo Branco f2bcfc4025 Remove __future__.print_function 2019-06-08 14:30:49 -07:00
Fish a6d4a3f65f Fix a bug in _request_op_type_from_libvex. 2019-02-28 01:27:27 -08:00
Fish b0cce4133d Lint the code. 2019-02-28 01:27:01 -08:00
Audrey Dutcher 1e5a2ae319 Support optimization in consumers by providing continuous natural number tags 2019-02-23 14:08:59 -08:00
Fish addd93d178 Fix a stupid typo in IRExpr.replace_expression(). (#145) 2018-07-05 02:24:02 -07:00
Fish 30009df4dc Implement expression replacing for IRStmt and IRExpr. (#140)
This commit fixes issue angr/angr#1096. Thanks @Alexeyan for reporting.
2018-07-01 10:57:51 -07:00
Fish 34167b7989 Add {RdTmp,Const}.get_instance(). (#139) 2018-06-30 22:20:36 -07:00
Fish e765399a0d Cache common IRExprs to reduce memory usage. (#135) 2018-06-30 00:21:54 -07:00
Fish 61efbdcf63 Add __slots__ to some classes that are missed before. 2018-06-23 00:04:16 -07:00
Audrey Dutcher 74d61164a8 Raise these errors correctly 2018-05-17 20:43:44 -07:00
Fish 953ae7cf6a Replace some regex matching with dict lookups to increase the speed of lifting. 2018-02-26 07:32:41 -08:00
Fish 206a93c4a2 Fixed a few lines of code to speed up lifting. 2018-02-24 01:57:57 -08:00
Fish eff47d2037 Add a Mod operation to VEX.
It can be handy when implementing support for some architectures.
2017-11-06 11:00:25 +08:00
Andrew Dutcher a3aa9f7daf Make pyvex py3k compatible 2017-09-13 12:44:23 -07:00
Eric Gustafson fbefce6f4c Add GT/GE 2017-09-04 06:58:33 -07:00
Nilocunger b6d653f41d Add the xor instruction. 2017-08-31 14:19:59 -07:00
Nilocunger 0548c00763 Add integer type imagination 2017-08-29 13:12:13 -07:00
Nilocunger b563489c20 Add polymorphic type constraints to Vex ops 2017-08-27 22:42:31 -07:00
Nilocunger ca95e92e61 Simplify how pyvex manages types. 2017-08-27 17:47:41 -07:00
Nilocunger d30f900262 Add ability to override type signatures 2017-08-18 15:44:07 -07:00
Andrew Dutcher 07af5ca220 Rename BBPTR to GSPRT 2017-03-16 17:10:03 -07:00
Andrew Dutcher 0caa274617 Reorganize IRSB methods and add typechecking. writing python lifters is now feasible. 2016-12-21 16:46:16 -08:00
Andrew Dutcher 02db439644 Remove 'tag' from slots now that it's a class variable 2016-12-16 14:09:22 -08:00
Andrew Dutcher aac002fbbf Move away from calling into libvex to get expr types when possible 2016-12-16 13:59:08 -08:00
Andrew Dutcher 71730a75ed Add _to_c for ITE 2016-12-16 12:17:42 -08:00
Matt Revelle aeba4d9ac6 Added missing _to_c conversion for IRExprCCall. 2016-12-16 14:51:21 -05:00
Matt Revelle f2ece85a60 A few bugfixes and support for printing arch register names in Put statements and Get expressions. 2016-12-08 21:40:14 -05:00
Matt Revelle 0649f12a29 Further updates for IR comp creation in Python. Added conversion to C structs for IRExprs, as well as IRCallee and IRRegArray which are members of IRExprs. Conversion to C structs allows use of libvex function for evaluating result type and size given a type environment (typeOfIRExpr). Result type and size were dropped as attributes of IRExprs since the type information is dependent on the type environment. The corresponding C IRExprs do not include result_type or result_size as attributes and dropping them from the Python IRExpr classes allows roundtripping to C libvex without loss of information. It also drops the requirement to have an IRSB or type environment available when creating an IRExpr instance. This should permit pyvex to be used in a more general manner and permits easier testing and development. 2016-12-01 14:48:28 -05:00
Matt Revelle c00317f4a2 Fixed a few typo bugs introduced when removing need for irsb argument. 2016-11-29 08:48:55 -05:00
Matt Revelle ef0dc30e12 Added from_c methods and updated init methods for IRExprs. 2016-11-19 17:31:11 -05:00
Andrew Dutcher 0c9997305b Ask archinfo for a better register name based on the size 2016-08-13 15:17:29 -07:00
Fish b62b4f17a9 Use slots to Python objects per rhelmot's suggestion.
Here is the result of a stupid benchmark:

Generating CFGFast on widevine.elf (an ARM binary with 20046 basic
blocks)

- with slots:    1.47GB 123.97 sec
- without slots: 4.4GB 177.31 sec

Andrew is awesome!
2016-06-26 20:18:33 -07:00
Andrew Dutcher 3d72665f6d restructured the code into several files and no useless submodules 2016-03-22 17:27:02 -07:00