Commit graph

12 commits

Author SHA1 Message Date
Sascha Schirra 13007eb12a renamed unicorn gem to unicorn-engine (#895)
* renamed gem unicorn to unicorn-engine

* renamed modules to unicornengine

* renamed Module Unicorn to UnicornEngine and the gem unicorn-engine to unicornengine

* unicornengine -> unicorn_engine
2017-09-19 07:43:21 +07:00
fallenoak 46ae3a042e Ruby: Support reading and writing x86 FPU stack registers (#892)
In order to reduce rounding problems from calculations, FPU stack
registers for x86 architectures contain values stored in an
80-bit extended precision format.

As a result, reading and writing to these registers requires
specific handling.

This update brings the Ruby bindings in line with the Python
bindings by supporting reading and writing the FPU stack registers
using 2-element arrays: [mantissa, exponent]

The mantissa array element contains the first 64 bits of the FPU
stack register.

The exponent array element contains the last 16 bits of the FPU
stack register.
2017-09-17 22:44:30 +07:00
Sascha Schirra 6d8031eca4 typo fixed: contest_restore -> context_restore (#843) 2017-05-23 00:52:34 +08:00
misson20000 9cb64915c7 fix Ruby bindings (#830)
* fix mem_unmap and query for Ruby bindings

* ruby bindings: fix issues with GC freeing callbacks while we still have references to them

* ruby bindings: add test for garbage collection of hooks

* ruby bindings: let the VM garbage collect hooks properly this time

* ruby bindings: update garbage collection test to make sure Proc is garbage collected after Uc is collected

* ruby bindings: fix m_uc_hook_add to return the ruby VALUE with proper memory management instead of making another one with bad memory management

* ruby bindings: fix cb_hook_intr signature

* add architecture query

* ruby bindings: only treat certain x86 registers specially if we're actually on x86

* only treat certain x86 registers specially if we're actually on x86 (uc_reg_read and uc_reg_write)

* ruby bindings: read and write ARM64's 128-bit NEON registers
2017-05-22 20:46:30 +08:00
Sascha Schirra eb4dc61c66 Updated ruby bindings (#744)
* added methods for uc_context_save, uc_context_restore

* added test for context_save

* changed version of the lib
2017-01-29 08:13:17 +08:00
Lowly Worm df497a9502 fix signedness issue with reg read/write in ruby bindings 2016-10-26 00:30:22 -07:00
Sascha Schirra 97c39a3a83 Bugfix: remove hook_add call if no insn type is given 2016-03-27 20:58:05 +02:00
Nguyen Anh Quynh c9b36c1b1d Merge pull request #475 from sashs/master
GDT regress test
2016-03-25 10:09:04 +07:00
Sascha Schirra 3642c68587 Remove blank line 2016-03-22 18:36:26 +01:00
Nguyen Anh Quynh 16f77061d9 ruby: spaces & indentation 2016-03-22 20:54:51 +08:00
Sascha Schirra 9379d41764 blank lines removed 2016-03-22 13:30:29 +01:00
Sascha Schirra 5e72ce39f0 ruby binding added 2016-03-22 12:17:23 +01:00