Commit Graph

458 Commits

Author SHA1 Message Date
Sean Heelan
cb2b97f26c Remove uc_cb_eventmem_t as it is identical to uc_cb_hookmem_t, as per
issue #111
2015-09-22 12:37:05 +07:00
Sean Heelan
75c5904ec1 Makes the hook types consistent, with a single indicator for each of
read, write and fetch.

This commit only adds the enum values. The functionality still has to be
updated.

As per issue #111
2015-09-22 12:26:01 +07:00
Nguyen Anh Quynh
734aa15fa6 correct supported archs in COMPILE.TXT 2015-09-22 12:12:17 +08:00
Nguyen Anh Quynh
14a01b5186 mips: handle delay slot so do not duplicate calling instruction handler. this fixes issue #133 2015-09-22 11:59:53 +08:00
Nguyen Anh Quynh
80c316026f update .gitignore 2015-09-22 11:05:38 +08:00
Nguyen Anh Quynh
a853eb6363 mips, m68k: early check to see if the address of BB is the until address 2015-09-22 10:24:26 +08:00
danghvu
242713ce64 Missing update on make test clean 2015-09-21 21:04:20 -05:00
Nguyen Anh Quynh
25342d71d1 m68k -> M68K, x86 -> X86 2015-09-22 10:00:05 +08:00
Nguyen Anh Quynh
7d8d044b5e Merge pull request #145 from JonathonReinhart/update-readme
change README to markdown, minor edits
2015-09-22 09:58:23 +08:00
danghvu
3c1d65ea66 Reorganize test directories 2015-09-21 20:47:45 -05:00
danghvu
0c67f41ed9 Fix issue #118 2015-09-21 20:30:05 -05:00
Nguyen Anh Quynh
f9dc4dcede test: fix test_x86_64() 2015-09-21 22:56:53 +08:00
Nguyen Anh Quynh
26ee533303 return NULL in memory_mapping() if no memory is mapped. this fixes test_bad_unmap in test_x86.c 2015-09-21 22:17:26 +08:00
Nguyen Anh Quynh
441d15e314 test: correct the input code for test_i386_invalid_mem_read() 2015-09-21 21:45:32 +08:00
Nguyen Anh Quynh
d8c3b44cb6 Merge branch 'unit-testing-framework' of https://github.com/JonathonReinhart/unicorn into JonathonReinhart-unit-testing-framework 2015-09-21 21:08:00 +08:00
Jonathon Reinhart
163e9020c8 test/unit: add test_sanity
This test ensures that the custom uc_assert_xxx() macros are working
as intended.
2015-09-21 08:37:27 -04:00
Jonathon Reinhart
02daa8df46 test/unit: simplify uc_assert_fail() macro
This removes the UC_ASSERT_ERR_ANY constant, which was causing a
compilation error on OSX:

error: comparison of constant 3735928559 with expression of type
'uc_err' (aka 'enum uc_err') is always true
[-Werror,-Wtautological-constant-out-of-range-compare]

I could have probably changed 0xDEADBEEF to a constant < 0x80000000
but this seems cleaner anyway.
2015-09-21 08:37:21 -04:00
Nguyen Anh Quynh
47b904c3ba Merge pull request #139 from JonathonReinhart/unit-testing-framework
[WIP] Unit testing framework
2015-09-21 11:18:59 +08:00
Jonathon Reinhart
07122809b5 test/unit: add test_basic_blocks
This verifies that the basic block callback is working as expected.
2015-09-20 22:45:45 -04:00
Nguyen Anh Quynh
d7d4be25b1 arm64: early check to see if the address of this block is the until address 2015-09-21 10:26:33 +08:00
Jonathon Reinhart
cc1cfb9141 add information about unit tests to COMPILE.txt 2015-09-20 22:16:48 -04:00
Jonathon Reinhart
1be8ef69c8 add 'test' to main Makefile 2015-09-20 22:16:48 -04:00
Jonathon Reinhart
46ee860084 update to new error constants and silence printfs 2015-09-20 22:16:48 -04:00
Jonathon Reinhart
f225584f77 change README to markdown, minor edits 2015-09-20 22:10:51 -04:00
Jonathon Reinhart
7a98fc4e78 add tests to test_x86.c from samples/ 2015-09-20 21:13:22 -04:00
Jonathon Reinhart
c026c23efb add more mem map API tests 2015-09-20 21:13:22 -04:00
Jonathon Reinhart
4dae31b25e add uc_assert_(err|fail) macros 2015-09-20 21:13:22 -04:00
Jonathon Reinhart
df3966a90c continued work on test framework 2015-09-20 21:13:22 -04:00
Jonathon Reinhart
d4de54601d add start of test_mem_map.c 2015-09-20 21:13:22 -04:00
Jonathon Reinhart
12909e6a4c add basic cmocka unit test 2015-09-20 21:13:22 -04:00
Nguyen Anh Quynh
ad835459bd fix conflicts when merging new_regress to master 2015-09-20 00:21:20 +07:00
Nguyen Anh Quynh
9aa04d9496 tb_gen_code(): only check to link next page if tb->size > 0 (so we skip empty block) 2015-09-20 00:05:17 +07:00
Nguyen Anh Quynh
7ab8d667fd fix regress/fpu_mem_write.py so it really emulates code 2015-09-20 00:02:30 +07:00
Nguyen Anh Quynh
4d45f11a08 regress/regress.py can be run from inside regress/ 2015-09-19 17:06:50 +07:00
danghvu
cbb2cf3618 Regress python testcases must define expected value via unittest 2015-09-17 15:45:15 -05:00
danghvu
8c163706e4 Fix issue #113, untracked reference 2015-09-16 21:33:01 -05:00
Nguyen Anh Quynh
5005b4a6e2 arm: early check to see if the address of this block is the until address 2015-09-17 09:16:57 +07:00
Nguyen Anh Quynh
d6b9c31dc9 sparc: more cleanup 2015-09-16 16:04:12 +07:00
Nguyen Anh Quynh
f36bd83f85 cleanup regress/sparc*.py 2015-09-16 15:46:10 +07:00
mothran
893e6abcbd first atttempt at SPARC64 fixes, no longer SEGV's, set CPU model to: Sun UltraSparc IV 2015-09-15 23:12:03 -07:00
Nguyen Anh Quynh
fe807952d0 bindings: update Sparc registers after the last core change 2015-09-15 14:17:57 +07:00
Nguyen Anh Quynh
e581b8ea0e Merge branch 'master' of https://github.com/unicorn-engine/unicorn 2015-09-15 14:17:10 +07:00
Nguyen Anh Quynh
7eaedc5c15 add a comment for Arm instruction in regress/arm_movr12_hang.py 2015-09-15 14:16:57 +07:00
Nguyen Anh Quynh
163e49bf59 Merge pull request #141 from mothran/sparc_regs
Updated sparc register system
2015-09-15 14:14:46 +07:00
mothran
6962126707 update sparc_reg.py with %i registers 2015-09-14 23:28:09 -07:00
mothran
d1e19df64e update the sparc_reg to test all g/o/l registers 2015-09-14 23:05:33 -07:00
mothran
69d73aa845 added emulated SPARC code for regress/sparc_reg.py, appears to be a bug in G and I registers 2015-09-14 21:23:42 -07:00
mothran
1638372793 fix small whitespace issue 2015-09-14 20:48:31 -07:00
mothran
f4894a1c77 removed unneed cases in the switch statement 2015-09-14 20:44:50 -07:00
mothran
d4d5631181 updated the sparc.h header so the alignment of certain registers was correct 2015-09-14 20:42:41 -07:00