Commit Graph

1911 Commits

Author SHA1 Message Date
Andrew Dutcher
d7735487f7 Use the qemu helpers to get/set the x86 eflags (#878) 2017-09-15 22:18:38 +07:00
Andrew Dutcher
363cbacee4 Only set eip to the instruction pointer after an interrupt if the interrupt was user-generated (#875) 2017-08-29 17:14:36 +07:00
Jonas
a893bcf138 Changed constatns in ruby gdt example (#876)
I think those two numbers are wrong, see http://wiki.osdev.org/Global_Descriptor_Table
2017-08-29 17:03:52 +07:00
Jean-Baptiste Cayrou
b1995b4b8a Fix C syntax mistake in test_gdt_idt_x86.c (#867)
Now 'make test' command works
2017-08-07 10:31:10 +08:00
Ficture Seven
ac9da14b3f uc_mem_unmap returns proper error code & fixes #863 (#864) 2017-08-01 18:59:55 +08:00
Nguyen Anh Quynh
de7bf524f3 tests: fix mem_fuzz.c - FIXME 2017-07-23 16:33:57 +08:00
Nguyen Anh Quynh
281177aa9d regress: an attempt to fix build error on mem_fuzz.c 2017-07-22 23:40:59 +08:00
darkf
42d0632108 Fix typo in ARM tcg-target.c (#859) 2017-07-22 23:36:38 +08:00
Stephen
da21bd0589 Start moving examples in S files (#851)
* Move assembly to S files

* more assembly files

* osx compilation change

* makefile mistake

* add objcopy from crosstool

* use gobjcopy on osx

* start cmocka install cleanup

* move wget to directory option

* move back to cd

* fix copy

* First cut

* free allocated memory

* bad idea

too much switching between python and c

* add debug

* cleanup bad size
2017-06-25 10:14:22 +08:00
Stephen
7f116846c0 MSYS test (#852)
* MSYS test

using new cmocka msys package

* Update .appveyor.yml

* temp package install

before real ones get uploaded to db

* Update .appveyor.yml

* Update .appveyor.yml

* Update .appveyor.yml

* Update Makefile

* Update test_x86_shl_enter_leave.c

* Update Makefile

* Update threaded_emu_start.c

* Update .appveyor.yml

* remove unused install
2017-06-25 10:11:35 +08:00
Nguyen Anh Quynh
821245e766 fix MSVC warning 2017-06-16 16:37:33 +07:00
Nguyen Anh Quynh
fe466d003a callback to count number of instructions in uc_emu_start() should be executed first. fix #727 2017-06-16 13:22:38 +08:00
Nguyen Anh Quynh
8f2d6cd70f samples: comment out test_i386_invalid_c6c7() 2017-06-14 16:14:36 +07:00
Nguyen Anh Quynh
9d52d580d2 Merge branch 'bugfix-x86' of https://github.com/vardyh/unicorn into vardyh-bugfix-x86 2017-06-14 15:17:25 +07:00
Andrew Dutcher
744c34261f Don't error during sdist if config-host.mak doesn't exist (#846) 2017-05-31 11:36:33 +08:00
vardyh
944658e920 samples::x86: introduce C6/C7 validation testcase
Signed-off-by: vardyh <vardyh.dev@gmail.com>
2017-05-25 17:55:40 +08:00
vardyh
ad767abda8 x86::trans: handle illegal case for opc c6/c7
Reference Intel software developer manual vol2 Appendix A Table A-6 for
detailed decoding information.

Signed-off-by: vardyh <vardyh.dev@gmail.com>
2017-05-25 15:22:45 +08: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
misson20000
3fdb2d2442 add architecture query (#842) 2017-05-21 09:47:02 +08:00
bulaza
14222bd5f0 Update UC_HOOK_MEM_VALID (#837)
* Update UC_HOOK_MEM_VALID

UC_HOOK_MEM_READ fires before handlers for invalid memory reads, so UC_HOOK_MEM_VALID would technically also be receiving invalid memory reads. Switching to UC_HOOK_MEM_READ_AFTER ensures that only actually valid reads are hooked

* Removed macro change, added comment

Removed the macro change, but added a clarifying comment. May submit a future PR with a new macro added

* Update unicorn.h

will -> may

* Update unicorn.h
2017-05-18 08:12:46 +07:00
Fangrui Song
85e0a54e35 Fix Python 3 samples (#836) 2017-05-15 09:11:22 +08:00
misson20000
014ccfb94a Aarch64 add thread registers (#834)
* add thread registers to AArch64

* update bindings to add AArch64 thread registers

* fix indentation for register read/write switch-case in unicorn_aarch64.c
2017-05-14 14:42:49 +07:00
bulaza
476553223b Fixing issues with const_generator.py (#832) 2017-05-14 00:16:48 +07:00
bulaza
4b9efdc986 Adding INSN hook checks for x86 (#833)
* adding INSN hook checking for x86

* tabs to spaces

* need to return bool not uc_err

* fixed conditional after switching to bool
2017-05-14 00:16:17 +07:00
Ryan Hileman
4b50ca5cec Go: improve hook callback speed by 30% and add a HOOK_CODE benchmark (#835)
* add x86 hook benchmark

* Go: improve hook callback speed by 30%
2017-05-14 00:12:57 +07:00
Ryan Hileman
d39c20acfe Go: fix NewRegBatch([]int{}) (#831) 2017-05-12 09:39:04 +07:00
Ryan Hileman
ae6ea3b91d fix arm64 hang (fix #827) (#828) 2017-05-09 20:19:32 +08:00
Ryan Hileman
b93ca7f565 fix unreachable UAF (fix #758) (#824) 2017-05-08 10:40:34 +08:00
Ryan Hileman
37edadedec go: add faster RegBatch type (#822) 2017-05-06 22:32:35 +08:00
bulaza
e95edd37f3 Update unicorn.h (#821)
Further clarifying the comments I PRed last week.
2017-05-06 22:32:00 +08:00
Samuel Groß
5385baba39 Implemented read and write access to the YMM registers (#819) 2017-05-05 09:02:58 +08:00
zhangwm
4a62409949 arm64eb: arm64 big endian also using little endian instructions. (#816)
* arm64eb: arm64 big endian also using little endian instructions.

* arm64: using another example that depends on endians.

example:
1. store a word: 0x12345678
2. load a byte:
   * little endian : 0x78
   * big endian    : 0x12
2017-05-04 20:00:48 +08:00
Ryan Hileman
1b00d3f89a remove slow cpu QOM casts (#815) 2017-05-02 14:56:39 +08:00
Ryan Hileman
187b470245 add arm64 CPACR_EL1 register support (#814) 2017-05-02 14:51:19 +08:00
David Zimmer
9eebd6daa3 vb bindings remove DYNLOAD (#812) 2017-04-27 20:43:47 +08:00
xorstream
fa45a42c76 Removed MSVC binding. (#808) 2017-04-27 10:21:04 +08:00
bulaza
c09a52e803 Update comments on UC_MEM_*_UNMAPPED (#811)
Updated the comment on UC_MEM_*_UNMAPPED to clarify what happens if "true" is returned
2017-04-27 09:29:01 +08:00
xorstream
1940bc7032 Added arm64eb sample to sample_all.sh script (#809) 2017-04-25 13:42:13 +08:00
Nguyen Anh Quynh
0109cd6c8a Merge branch 'master' into a64 2017-04-25 13:00:15 +08:00
Nguyen Anh Quynh
0bef33aecc Merge branch 'a64-msvc' of https://github.com/xorstream/unicorn into a64 2017-04-25 12:58:43 +08:00
Nguyen Anh Quynh
3c7e29958b update CREDITS.TXT 2017-04-25 12:56:47 +08:00
Nguyen Anh Quynh
2bd40b9c91 update armeb & arm64eb samples 2017-04-25 12:55:26 +08:00
Nguyen Anh Quynh
09d14704a5 bindings: update after UC_VERSION_EXTRA change 2017-04-25 12:41:00 +08:00
xorstream
75bab051f8 Added MSVC support for arm64eb. 2017-04-25 14:23:58 +10:00
Nguyen Anh Quynh
c2643f3077 Merge branch 'master' of https://github.com/xizhizhang/unicorn into xizhizhang-master 2017-04-25 10:18:12 +08:00
bulaza
f6908f03a9 Updated uc_close comment to clarify usage (#805) 2017-04-24 23:55:18 +08:00
zhangwm
2e973a13f0 arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00
Nguyen Anh Quynh
513075e061 arm: fix an warning reported by GCC 2017-04-21 21:12:57 +08:00
xorstream
7f1d7094e6 Msvc readme.txt updated (#803)
* Added armbe support to MSVC branch.

* Updated readme.txt to remove notes about winsock usage.
2017-04-21 15:54:53 +08:00