Commit Graph

120 Commits

Author SHA1 Message Date
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 7a1930a879 add UC_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:37:47 +08:00
Nguyen Anh Quynh 4083b87032 add new hook type UC_HOOK_MEM_READ_AFTER, adapted from PR #399 by @farmdve. updated all bindings, except Ruby & Haskell 2016-10-22 11:19:55 +08: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 a6e8564153 typo 2016-10-07 10:06:53 +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
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
Andrew Dutcher 0ef2b5fd71 New feature: registers can be bulk saved/restored in an opaque blob 2016-08-20 04:14:07 -07: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
Chris Eagle 1c73753507 don't try to override native C++ data type 2016-06-06 19:05:05 -07:00
xorstream 6ca8ba16fc Changed bool typedef from int to unsigned char. 2016-05-10 23:53:39 +10:00
xorstream 544942cc64 Added MSVC bindings for uc_reg_write_batch() and uc_reg_read_batch() and fixed UC_HOOK_INSN hooking. 2016-05-10 23:29:11 +10:00
Nguyen Anh Quynh c45f791dd2 delete include/unicorn/platform.h 2016-04-30 08:41:12 +08:00
Ryan Hileman acd88856e1 add batched reg access 2016-04-04 20:51:38 -07:00
Adrian Herrera fd825fb800 Added stdint include to x86.h
x86.h referenced types defined in stdint.h (e.g. uint16_t, etc.), but didn't
actually include stdint.h
2016-04-01 23:38:32 +11:00
feliam 23b3f651f9 Indentation 2016-03-10 07:45:36 -03:00
feliam 0a3799eada FPU control word and tags 2016-03-09 19:14:33 -03:00
Spl3en 338fb0e81b Fix a typo in uc_hook_add documentation. 2016-03-07 17:52:08 +01: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 f267ff2b17 Update unicorn.h
remove an outdated line on UC_QUERY_MODE
2016-02-15 10:27:20 +08:00
Nguyen Anh Quynh 0822c0af85 bump API version to 1.0 2016-02-11 08:05:15 +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 ed77cacbf3 cosmetic change for uc_x86_mmr 2016-02-06 17:34:19 +08:00
Chris Eagle 49b9f4f8da uc_x86_mmr type available in qemu/target-i386/unicorn.c 2016-02-04 19:09:41 -08:00
Chris Eagle 59f7bf3be7 file perms 2016-02-04 16:48:27 -08:00
Chris Eagle e59382e030 updated gdtr/idtr/ldtr/tr read/write code 2016-02-04 16:44:52 -08:00
Chris Eagle 9977054a15 add support for setting gdtr, idtr, ldtr, and tr programatically 2016-02-03 09:22:29 -08:00
Nguyen Anh Quynh a2ef52172c add combination hook type UC_HOOK_MEM_VALID to intercept all valid memory access 2016-01-31 13:12:34 +08: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 6f3d48077e rename UC_QUERY_ARM_MODE to a more generic name UC_QUERY_MODE. make all bindings support this new constant 2016-01-24 01:08:23 +08: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
Nguyen Anh Quynh d79925f477 sparc: add SPARC32 mode (= UC_MODE_32) 2016-01-23 10:48:18 +08:00
xorstream 288ef1df0a Fix uc_mode usage in source code 2016-01-23 12:10:12 +11:00
xorstream 8763d426c2 Fix uc_mode usage in source code 2016-01-23 12:08:49 +11:00
xorstream 82b7599e15 Sorted uc_modes by CPU and added masks 2016-01-23 09:47:29 +11:00
xorstream b48fbf7520 Sorted uc_modes by CPU and added masks 2016-01-23 00:55:31 +11:00
xorstream 789971eeb9 Sorted uc_modes by CPU and added masks 2016-01-23 00:53:34 +11:00
Nguyen Anh Quynh f5fa84d985 consistent style for docs of unicorn.h 2016-01-16 18:31:24 +08:00
Nguyen Anh Quynh 978f671fa5 fix some comments in unicorn.h 2016-01-16 18:17:13 +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
Ryan Hileman 230cbd5330 add permissions to map_ptr api 2015-11-28 11:28:31 -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
Nico01 4127179fe3 fix compilation with capstone next 2015-11-07 16:55:42 +01: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