Commit Graph

311 Commits

Author SHA1 Message Date
Brian Foley
dbc6cc27c7
Fix compile if HAS_ARM is defined but HAS_ARM_EB isn't (#1338) 2020-10-07 11:42:14 +08:00
lazymio
1044403d38
Implement uc_context_free (#1336)
* Implement uc_context_free

* Use uc_context_free for python bindings

* Format code

* Simplify code

* Move next,context inside while loop

* Add my name to CREDITS.TXT
2020-09-24 22:28:55 +08:00
lazymio
4441394258
Fix context saving (#1335)
* Fix context size

* Make UcContext convertible to bytes and picklable

Fix when updaing context

* Test context pickling

* Fix double free when the context is pickled from bytes
2020-09-24 00:53:23 +08:00
Nguyen Anh Quynh
2e0f753e6f save cpu->jmp_env in saving context, so uc_emu_start() can be reentrant. also improved Python binding on handling context 2020-06-05 20:12:44 +08:00
BrunoPujos
6cad700b69
fix recursive UC_HOOK_MEM callbacks for cross pages access (#1113)
Co-authored-by: bruno <bruno>
Co-authored-by: Nguyen Anh Quynh <aquynh@gmail.com>
2020-05-25 16:22:28 +08:00
Nguyen Anh Quynh
fbef45b18f remove UC_ERR_TIMEOUT, so timeout on uc_emu_start() is not considered error. added UC_QUERY_TIMEOUT to query exit reason 2020-05-24 23:54:45 +08:00
Nguyen Anh Quynh
ef92e5ed71 coding style cleanup 2020-05-07 14:30:22 +08:00
BAYET
881e08da01
Fix UAF when deleting hook while in hook callback #1127 (#1130)
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...

* Fix the UAF situation when deleting a hook while being in a hook callback. Added an attribute 'to_delete' to hooks, and a list hooks_to_del to delay the free of the hooks

* Minor fixes ; forgot return type of clear_deleted_hooks ; do not declare variable in for predicate
2020-05-07 14:24:48 +08:00
ζeh Matt
3a3bc0c22d Timeout error (#1173)
* Implement timeout state and new error for such case

* Adjust test_i386_loop sample

* Adjust test_i386_loop test
2019-12-29 00:16:54 +08:00
BAYET
8987ad0fff Handle serialization of cpu context save (#1129)
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...
2019-09-07 19:09:17 +08:00
Fish
626d72d6df Two fixes to get unicorn build better with MSVC. (#1136)
* Change MSVC keywords.

typename, class, and class are all keywords for MSVC. Adding a suffix for
all of them allows a successful compilation under VC 2017 (15.9).

* Switch from /ZI to /Zi to avoid crashes at longjmp in debug builds.
2019-09-05 00:53:37 +08:00
Chen Huitao
23a426625f check arguments, return error instead of raising exceptions. (#1125)
* check arguments, return error instaed of raising exceptions. close #1117.

* remove empty lines. remove thr underscore prefix in function name.
2019-08-23 17:05:13 +08:00
Aldo Mazzeo
d38c8fb27f Don't duplicate a uc_mem_map_ptr'd memory region when splitting it (#1028) (#1030) 2019-03-07 09:05:26 +08:00
Nguyen Anh Quynh
4d0157eb4a x86: fix #968. also fix potential bug of not clearing high bytes when updateing EIP 2018-07-26 15:19:23 +08:00
Nguyen Anh Quynh
58e1f03f12 Revert "x86: fix #968"
This reverts commit 91033dd0f0.
2018-07-25 17:04:35 +08:00
Nguyen Anh Quynh
91033dd0f0 x86: fix #968 2018-07-25 13:34:15 +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
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
misson20000
3fdb2d2442 add architecture query (#842) 2017-05-21 09:47:02 +08: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
b93ca7f565 fix unreachable UAF (fix #758) (#824) 2017-05-08 10:40:34 +08:00
zhangwm
2e973a13f0 arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00
Nguyen Anh Quynh
094ca80092 fix conflicts 2017-03-30 12:23:24 +08:00
fG!
1bef32fff6 Fix huge memory leak on uc_mem_protect() (#787)
A memory region is allocated inside split_region() that was only freed in error case but not on success case, leading to huge memory leak if the region size was significant.
2017-03-18 09:17:23 +08:00
zhangwm
ccdb0ff523 armeb: rename arm's and mips's *REGS_STORAGE_SIZE to avoid big-endian and little-endian's duplicated definition. 2017-03-15 22:25:35 +08:00
zhangwm
d8fe34a2e8 armeb: Add support for ARM big endian. 2017-03-13 22:32:44 +08:00
Nguyen Anh Quynh
c01dcf0a14 fix merge conflicts 2017-03-10 21:04:33 +08:00
Ahmed Samy
02e6c14e12 x86: add MSR API via reg API (#755)
Writing / reading to model specific registers should be as easy as
calling a function, it's a bit stupid to write shell code and run them
just to write/read to a MSR, and even worse, you need more than just a
shellcode to read...

So, add a special register ID called UC_X86_REG_MSR, which should be
passed to uc_reg_write()/uc_reg_read() as the register ID, and then a
data structure which is uc_x86_msr (12 bytes), as the value (always), where:
	Byte	Value		Size
	0	MSR ID		4
	4       MSR val		8
2017-02-24 21:37:19 +08:00
Nguyen Anh Quynh
6ea39f7d5a merge msvc with master 2017-02-24 10:39:36 +08:00
radare
8acd6d47c9 Properly honor UNICORN_HAS_ (#757)
* Properly honor UNICORN_HAS_

* Oops missed that
2017-02-24 10:00:36 +08:00
vardyh
7f9251511e MSVC port (vardyh) (#746)
* unicorn: use waitable timer to implement usleep() on Windows

Signed-off-by: vardyh <vardyh.dev@gmail.com>

* atomic: implement barrier() for msvc

Signed-off-by: vardyh <vardyh.dev@gmail.com>
2017-02-07 21:31:35 +08:00
xorstream
770c5616e2 Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
xorstream
b0ae2138fb Merge remote-tracking branch 'unicorn-engine/master' into msvc_native 2017-01-20 22:37:51 +11:00
xorstream
ee294eebb0 Fixed double free in win32 threads and changed free() to g_free(). (#722) 2017-01-20 16:03:35 +08:00
Nguyen Anh Quynh
42771848d6 no more spinlock 2017-01-20 14:57:33 +08:00
xorstream
002151874a Unicorn interface working with test app in 32bit and 64bit builds. 2017-01-20 17:27:22 +11:00
xorstream
1aeaf5c40d This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
Nguyen Anh Quynh
bc569f5a54 rename API uc_mem_free() to uc_free(). see #662 2017-01-10 20:59:14 +08:00
Nguyen Anh Quynh
fdbbdc6216 rename uc_context_free() to uc_mem_free(). see #373 2017-01-09 20:52:14 +08:00
Nguyen Anh Quynh
52cb0ba78e cleanup more synchronization code 2017-01-09 14:05:39 +08:00
Nguyen Anh Quynh
5777c4f3fd Merge branch 'noglib' of https://github.com/unicorn-engine/unicorn into noglib 2016-12-22 12:13:53 +08:00
Nguyen Anh Quynh
93044e39f1 Merge branch 'master' into noglib 2016-12-22 12:13:34 +08:00
Ryan Hileman
19b92a4a7e fix possible segfault in hook del (#691) (#697) 2016-12-22 00:50:40 +08:00
Chris Eagle
fccbcfd4c2 revert to use of g_free to make future qemu integrations easier (#695)
* revert to use of g_free to make future qemu integrations easier

* bracing
2016-12-21 22:28:36 +08:00
Chris Eagle
e46545f722 remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
Nguyen Anh Quynh
200f0d195e fix some Msys complains 2016-11-04 21:40:35 +08:00
Nguyen Anh Quynh
04b103164d fix Brew installation in issue #663 2016-11-01 20:30:55 +08:00
Nguyen Anh Quynh
8f99d20695 turn cpu_context_size() into static function 2016-10-12 11:05:32 +08:00
Andrew Dutcher
80f35d3b2b remove safety checks, for some reason 2016-10-11 13:07:14 -07:00
Andrew Dutcher
ea54204952 Tweak some names in a few places, encapsulate the uc_context struct to hide it from users for some reason 2016-10-10 14:04:51 -07:00
Andrew Dutcher
1ab2154fe5 Change save/restore API to have explicit alloc/free functions. Python has explicit save/update functions. 2016-10-07 11:39:42 -07:00
Nguyen Anh Quynh
6c54f9ce48 first_cpu is obsolete by recent changes 2016-10-07 10:10:18 +08:00
Nguyen Anh Quynh
73577cbcd1 rename uc_regstate_restore to uc_context_restore, uc_context_save to uc_context_save 2016-10-07 10:03:19 +08:00
Nguyen Anh Quynh
b7cdbe7a88 Merge branch 'feat/reg_save_restore' of https://github.com/rhelmot/unicorn into rhelmot-feat/reg_save_restore 2016-10-07 09:57:07 +08:00
danghvu
6aea0aee58 memleak: Add back object release for uc->cpu 2016-10-03 14:21:47 -05:00
Andrew Dutcher
e3b0e52013 Rename save/restore functions to match the style of the rest of the API 2016-09-28 21:21:44 -07:00
Ryan Hileman
cb615fdba7 remove uc->cpus 2016-09-23 07:38:21 -07:00
Andrew Dutcher
20ce432dbc Fix bracket style 2016-09-09 11:55:20 -07:00
Andrew Dutcher
3deb9fdcad Fix save/restore to work while emulation is not active 2016-09-08 14:41:34 -07:00
Andrew Dutcher
0ef2b5fd71 New feature: registers can be bulk saved/restored in an opaque blob 2016-08-20 04:14:07 -07:00
Ryan Hileman
cc57ba951f convert more allocs to glib 2016-08-11 08:16:14 -07:00
danghvu
bb8f894872 windows: Remove unnecessary mman inclusion (issue #587) 2016-07-11 13:35:49 -05:00
danghvu
117a318188 memleak: missing from refactoring 2016-07-08 12:49:43 -05:00
danghvu
6b9f17f2f7 memleak: refactor unicorn_common.h, move stuff to uc_close 2016-07-08 11:16:23 -05:00
Hoang-Vu Dang
9a2a5b15d8 Rename unhandled CPU exception 2016-07-05 11:10:39 -05:00
Hoang-Vu Dang
9cdca5a32b Unhandled interrupt will halt execution 2016-07-04 17:07:57 -05:00
Nguyen Anh Quynh
72ba554738 qemu_thread_join() takes only 1 arg 2016-04-23 10:17:04 +08:00
Nguyen Anh Quynh
3a742fb6f6 fix conflicts when merging no-thread to master 2016-04-23 10:06:57 +08:00
Zach Riggle
9f94191a64 Remove double-free
This was previously released at uc_close ../uc.c:286

    if (uc->release)
        uc->release(uc->tcg_ctx);

Which effectively does:

    object_unref(uc, OBJECT(uc->root));
2016-04-20 15:34:55 -07:00
Nguyen Anh Quynh
cc6cbc5cf7 Merge branch 'memleak' into m2 2016-04-18 12:48:13 +08:00
Nguyen Anh Quynh
47a7bb3c9f Merge branch 'smaller_nothreads' of https://github.com/cseagle/unicorn into cseagle-smaller_nothreads 2016-04-17 23:37:06 +08:00
Ryan Hileman
acd88856e1 add batched reg access 2016-04-04 20:51:38 -07:00
Ryan Hileman
d5e85cf3f9 more efficient hook removal 2016-03-25 20:25:18 -07:00
Ryan Hileman
f0af8f8282 execute cpus in same thread as uc_emu_start()
note: I'm sure this makes some dead code
2016-03-23 22:50:56 -07:00
Nguyen Anh Quynh
fb1ebac000 Merge branch 'master' into m1 2016-03-09 15:13:42 +08:00
Nicolas PLANEL
1087ba9dea [query] add UC_QUERY_PAGE_SIZE uc_query helper
Return the current page size used by the current arch.
Useful to call uc_mem_map() with memory/size aligned.

Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2016-03-04 15:54:24 +11:00
Nguyen Anh Quynh
871cdb692f Merge branch 'hook' 2016-02-17 09:37:17 +08:00
Nguyen Anh Quynh
b69feb8d0b Merge branch 'master' into memleak2 2016-02-15 15:52:10 +08:00
Nguyen Anh Quynh
5719481e3f move memory_overlap() around from mem_map() to mem_map_check(). this fixes test_mem_map.c in issue #420 2016-02-11 17:53:51 +08:00
Nguyen Anh Quynh
80b0356a86 fix a comment in uc_hook_add() for UC_HOOK_INSN 2016-02-11 09:27:30 +08:00
Nguyen Anh Quynh
a7a1dcc661 uc_hook_add(): add begin & end arguments for all hook types. also update Python binding after this change 2016-02-11 08:02:13 +08:00
Nguyen Anh Quynh
20b01a6933 fix merge conflict 2016-02-01 12:08:38 +08:00
Nguyen Anh Quynh
5a04bcb115 allow to change PC during callback. this solves issue #210 2016-01-28 14:06:17 +08:00
Nguyen Anh Quynh
e750a4e97c when uc_mem_exec() remove EXE permission, quit current TB & continue emulating with TB flushed. this fixes issue in PR #378 2016-01-28 00:56:55 +08:00
Nguyen Anh Quynh
48ab148d1c Merge branch 'hook' 2016-01-26 22:52:29 +08:00
Nguyen Anh Quynh
0c2194078e Merge branch 'hook-refactor' of https://github.com/lunixbochs/unicorn into hook 2016-01-25 20:42:56 +08:00
Ryan Hileman
cee9a7d011 fix missing HOOK_CODE bound check 2016-01-25 03:51:35 -08:00
xorstream
ec6d4d9ae0 Removed unneeded arm mode check 2016-01-24 22:36:37 +11:00
xorstream
26d3b1e7d6 Added ppc 32bit mode and added sparc mode checks to bring it in line with other archs 2016-01-24 22:27:33 +11:00
Nguyen Anh Quynh
4dbad9aa9b add new API uc_query() to query internal status of emulator at runtime 2016-01-23 17:14:44 +08:00
Ryan Hileman
2ac1281f82 rework code/block tracing 2016-01-22 19:07:50 -08:00
Nguyen Anh Quynh
249e2ac0a0 Merge branch 'hook-refactor' of https://github.com/lunixbochs/unicorn into lunixbochs-hook-refactor 2016-01-23 10:58:37 +08:00
Ryan Hileman
0886ae8ede rework code/block tracing 2016-01-22 18:42:27 -08:00
Ryan Hileman
93052f6566 refactor to allow multiple hooks for one type 2016-01-22 18:41:43 -08:00
Nguyen Anh Quynh
b6e9121f48 use spaces, but not tabs, for indentation 2016-01-23 09:34:02 +08:00
xorstream
678d645b80 Fix uc_mode usage in source code 2016-01-23 12:29:22 +11:00
xorstream
e9ba6ed804 Fix uc_mode usage in source code 2016-01-23 12:17:59 +11:00
xorstream
8763d426c2 Fix uc_mode usage in source code 2016-01-23 12:08:49 +11:00
xorstream
b7c43108bd Started fixing uc_mode flag usage 2016-01-23 10:45:58 +11:00
Nguyen Anh Quynh
21c614d0af properly verify ARM mode in uc_open(). see issue #389 2016-01-22 20:46:26 +08:00
Nguyen Anh Quynh
3d8f413ce8 new API uc_mem_regions() to retrieve the list of memory regions mapped by uc_mem_map_*() 2016-01-16 16:57:17 +08:00
Nguyen Anh Quynh
71ad9310fc sanity check on arguments of uc_mem_map_ptr() 2016-01-12 00:59:56 +08:00
farmdve
89eac66bf7 Move sanity checks before uc->memory_map is called. 2016-01-11 18:26:23 +02:00
Nguyen Anh Quynh
580bc7b56a cleanup 2016-01-10 23:10:00 +08:00
farmdve
036763d6ae Fix memory leaks as reported by DrMemory and Valgrind.
ARM and probably the rest of the arches have significant memory leaks as
they have no release interface.

Additionally, DrMemory does not have 64-bit support and thus I can't
test the 64-bit version under Windows. Under Linux valgrind supports
both 32-bit and 64-bit but there are different macros and code for Linux
and Windows.
2016-01-08 01:42:56 +02:00
Nguyen Anh Quynh
7e16f7a50d disallow mapping memory range that is already mapped. this fixes issue #350 2015-12-30 09:17:47 +08:00
Nguyen Anh Quynh
f935469658 mips: handle memory redirect for all APIs. this fixes issue #347 2015-12-28 15:19:30 +08:00
Nguyen Anh Quynh
771f9f7c3b fix conflicts when merging map-ptr branch to master branch 2015-12-17 08:12:02 +08:00
farmdve
8b79a872d0 Fix segfault introduced in my previous commits. 2015-12-11 22:35:25 +02:00
Nguyen Anh Quynh
3c72809373 end address of mapping memory is not inclusive, and can wrap around to 0. fix issue #299 2015-12-12 01:37:13 +08:00
Nguyen Anh Quynh
74986cc59a g_free() can handle NULL pointer 2015-12-11 11:25:35 +08:00
farmdve
3e57615c76 Fix uc_mem_unmap memory leak and in uc_close.
It appears the problem is that we are not calling the memory region
destructor. After modifying memory_unmap to include the destructor call
for the memory region, the memory is freed.

Furthermore in uc_close we must explicitly free any blocks that were not
unmapped by the user to prevent leaks.

This should fix issue 305.
2015-12-11 02:42:31 +02:00
Ryan Hileman
230cbd5330 add permissions to map_ptr api 2015-11-28 11:28:31 -08:00
Nguyen Anh Quynh
f4882ae1a2 simplify code by replacing mem_map_start()/mem_map_finish() in uc.c with mem_map() 2015-11-28 18:26:08 +08:00
Nguyen Anh Quynh
f57c098056 declare variables at begin of function 2015-11-28 15:56:19 +08:00
Ryan Hileman
6d21ebabea implement host-controlled memory mapping for #261 2015-11-27 23:30:36 -08:00
Nguyen Anh Quynh
2f297bdd3a handle some errors properly so avoid exit() during initialization. this fixes issue #237 2015-11-12 01:43:41 +08:00
Nguyen Anh Quynh
272293556a do not abort() when memory is insufficient. this fixes issue #244 2015-11-10 11:44:29 +08:00
practicalswift
4151d1d600 Fix segfault-on-emu_stop() bug. 2015-11-03 14:34:31 +01:00
Nguyen Anh Quynh
b41db5abd9 Merge pull request #229 from practicalswift/typos
Fix typos. Remove trailing whitespace.
2015-10-31 10:39:35 +08:00
practicalswift
4f521c371c Fix typos. 2015-10-30 22:32:59 +01:00
Nguyen Anh Quynh
b66a323b19 do not free MemoryRegion in memory_unmap() because it will be unref later in memory_region_unref(). this fixes issue #202 2015-10-28 01:26:59 +08:00
Nguyen Anh Quynh
3a36e327ab support memory redirection, so the issue #217 is fixed 2015-10-27 14:37:03 +08:00
coco
dd56621bbb fix for use after free in case of double unmap 2015-10-21 22:25:49 +02:00
Willi Ballenthin
34c7b70bcb uc.c: fix minor typo
s/argumet/argument/g
2015-10-19 16:52:56 -04:00
Nguyen Anh Quynh
b1d41d414b on some hook events, uc_hook_add() should not allow more than 1 handler. this add UC_ERR_HOOK_EXIST error type 2015-10-10 18:01:47 +08:00
Nguyen Anh Quynh
9e64cba6ec Rename some hook related enums:
- UC_ERR_READ_INVALID -> UC_ERR_READ_UNMAPPED
 - UC_ERR_WRITE_INVALID -> UC_ERR_WRITE_UNMAPPED
 - UC_ERR_FETCH_INVALID -> UC_ERR_FETCH_UNMAPPED
 - UC_MEM_READ_INVALID -> UC_MEM_READ_UNMAPPED
 - UC_MEM_WRITE_INVALID -> UC_MEM_WRITE_UNMAPPED
 - UC_MEM_FETCH_INVALID -> UC_MEM_FETCH_UNMAPPED
 - UC_HOOK_MEM_READ_INVALID -> UC_HOOK_MEM_READ_UNMAPPED
 - UC_HOOK_MEM_WRITE_INVALID -> UC_HOOK_MEM_WRITE_UNMAPPED
 - UC_HOOK_MEM_FETCH_INVALID -> UC_HOOK_MEM_FETCH_UNMAPPED
 - UC_HOOK_MEM_INVALID -> UC_HOOK_MEM_UNMAPPED

This also renames some newly added macros to use _INVALID postfix:

 - UC_HOOK_MEM_READ_ERR -> UC_HOOK_MEM_READ_INVALID
 - UC_HOOK_MEM_WRITE_ERR -> UC_HOOK_MEM_WRITE_INVALID
 - UC_HOOK_MEM_FETCH_ERR -> UC_HOOK_MEM_FETCH_INVALID
 - UC_HOOK_MEM_ERR -> UC_HOOK_MEM_INVALID

Fixed all the bindings Java, Go & Python.
2015-09-30 14:46:55 +08:00
Nguyen Anh Quynh
90eb8f2e72 This commit continues the PR #111
- Allow to register handler separately for invalid memory access
- Add new memory events for hooking:
   - UC_MEM_READ_INVALID, UC_MEM_WRITE_INVALID, UC_MEM_FETCH_INVALID
   - UC_HOOK_MEM_READ_PROT, UC_HOOK_MEM_WRITE_PROT, UC_HOOK_MEM_FETCH_PROT
- Rename UC_ERR_EXEC_PROT to UC_ERR_FETCH_PROT
- Change API uc_hook_add() so event type @type can be combined from hooking types
2015-09-24 14:18:02 +08:00
Sean Heelan
dfb4a9d9ad Revert "Remove uc_cb_eventmem_t as it is identical to uc_cb_hookmem_t"
As pointed out by aquynh the return types are actually different. A
uc_cb_eventmem_t callback returns a bool, while uc_cb_hookmem_t has a
void return type.

This reverts commit cb2b97f26c.
2015-09-23 12:51:47 +07:00
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
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
39ac1bcb4e rename UC_ERR_INVAL to UC_ERR_ARG 2015-09-09 16:54:47 +08:00
Nguyen Anh Quynh
d7ef204398 rename error codes ERR_MEM_READ, ERR_MEM_WRITE, ERR_MEM_FETCH 2015-09-09 16:25:48 +08:00
Nguyen Anh Quynh
d3d38d3f21 handle read/write/fetch from unaligned addresses. this adds new error codes UC_ERR_READ_UNALIGNED, UC_ERR_WRITE_UNALIGNED & UC_ERR_FETCH_UNALIGNED 2015-09-09 15:52:15 +08:00
Jonathon Reinhart
f6cecf45d2 change mem read/write APIs to use void*
Don't force the user to use uint8_t pointers, or cast their
pointers-to-other-objects to uint8_t* when calling these APIs.
2015-09-07 12:44:03 -04:00
Nguyen Anh Quynh
d1bdbd11e7 rename uchook to uc_hook, ucengine to uc_engine, uc_hook_t to uc_hook_type 2015-09-05 11:20:32 +08:00
Nguyen Anh Quynh
d506b900eb cache the last entry of mapped blocks in memory_mapping() for better performance 2015-09-04 15:40:47 +08:00
Nguyen Anh Quynh
022f8d82d1 handle memory fetch as invalid memory access. now we can also report error if exec memory is unmapped (UC_ERR_MEM_FETCH) 2015-09-04 11:55:17 +08:00
Jonathon Reinhart
5f32e2c1ae s/uc_hook_h/uchook/g 2015-09-03 22:39:23 -04:00
Jonathon Reinhart
da46071c7d bring new code and samples up-to-date with API changes 2015-09-03 22:15:49 -04:00
Jonathon Reinhart
5e9d07a40a Merge remote-tracking branch 'upstream/master' into change-handle-based-api 2015-09-03 22:01:52 -04:00
Nguyen Anh Quynh
e54519c09f cleanup 2015-09-04 09:20:13 +08:00
Chris Eagle
2da46caef7 smooth out split_region related code 2015-09-03 12:26:36 -07:00
Nguyen Anh Quynh
6ca85a72ed simplify uc_mem_protect() & uc_mem_unmap() 2015-09-04 01:02:38 +08:00
Nguyen Anh Quynh
9f9d57e84f cleaning & indentation 2015-09-03 18:16:49 +08:00
Nguyen Anh Quynh
b8d4240240 solve merging conflict 2015-09-03 18:05:21 +08:00
Jonathon Reinhart
5b62d436a9 change public APIs to use ucengine
See #52.
2015-09-02 22:00:09 -04:00
Jonathon Reinhart
bd0a6921cc Merge remote-tracking branch 'upstream/master' into change-handle-based-api 2015-09-02 21:04:43 -04:00
Nguyen Anh Quynh
03683a7960 fix an warning caused by _hook_mem_access() 2015-09-03 01:18:41 +08:00