Nguyen Anh Quynh
fba6046fd0
glib_compat: lift g_list_sort() & g_slist_sort() from glib code
2016-12-26 18:32:02 +08:00
Nguyen Anh Quynh
cb40e6a3f5
glib_compat: some minor fixes
2016-12-26 18:13:46 +08:00
Nguyen Anh Quynh
6b57da1fc2
glib_compat: make the API compatible with glib
2016-12-26 01:35:42 +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
9371ae7dd7
cleanup glib_compat
2016-12-22 12:13:31 +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
Nguyen Anh Quynh
6a2eb14ff3
Merge pull request #693 from cseagle/noglib
...
add g_free to make future integration easier
2016-12-21 08:50:52 +08:00
Chris Eagle
bfaf8f3441
add g_free to make future integration easier
2016-12-20 12:27:15 -08:00
Nguyen Anh Quynh
14d04493f1
Merge branch 'noglib' of https://github.com/cseagle/unicorn into noglib
2016-12-20 11:33:46 +08:00
Nguyen Anh Quynh
6d747d1a13
remove pkg-config dependency
2016-12-20 11:30:26 +08:00
Chris Eagle
f8f9e993a8
merge upstream/noglib and update some glib related types
2016-12-19 12:32:06 -08:00
Chris Eagle
e07e57a862
battling git
2016-12-19 12:10:02 -08:00
Chris Eagle
e53c295f61
please the gods of brace
2016-12-19 12:02:01 -08:00
Chris Eagle
71bda8e012
stick to gint/guint rather than int32_t/uint32_t
2016-12-19 09:43:35 -08:00
Nguyen Anh Quynh
bd1632e60c
fix an warning 'control may reach end of non-void function'
2016-12-20 00:21:02 +08:00
Nguyen Anh Quynh
16bbe4fb88
do not redefine GHashTable
2016-12-20 00:19:13 +08:00
Nguyen Anh Quynh
04e2e7e845
glib_compat.c: code style
2016-12-19 22:18:33 +08:00
Nguyen Anh Quynh
b19f1607c6
Revert "remove qemu/util/qemu-timer-common.c"
...
This reverts commit 934fa2c90f
.
2016-12-19 20:31:38 +08:00
Nguyen Anh Quynh
b680ee11f8
Revert "remove qemu/util/qemu-timer-common.c"
...
This reverts commit 934fa2c90f
.
2016-12-19 20:30:46 +08:00
Nguyen Anh Quynh
5f81c00559
Merge branch 'noglib' of https://github.com/cseagle/unicorn into cseagle-noglib
2016-12-19 17:32:27 +08:00
Nguyen Anh Quynh
934fa2c90f
remove qemu/util/qemu-timer-common.c
2016-12-19 17:29:25 +08:00
Chris Eagle
5690b7b68f
annotate the hash functions
2016-12-18 19:45:09 -08:00
Chris Eagle
c7bd120650
imlpement key destroy and value destroy callbacks in hash tables
2016-12-18 15:28:11 -08:00
Chris Eagle
e46545f722
remove glib dependency by provide compatible replacements
2016-12-18 14:56:58 -08:00
Nguyen Anh Quynh
e1b65a6edb
cleanup unused code
2016-11-19 23:48:23 +08:00
Nguyen Anh Quynh
1f65b76fbd
fix some compilation warnings regarding typcase of (CPUState *)
2016-10-26 17:05:26 +08:00
Nguyen Anh Quynh
c59e06d798
mips: fix some compilation warnings
2016-10-22 13:36:37 +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
Nguyen Anh Quynh
2a608c778e
sparc: fix an compilation warning
2016-10-21 22:32:02 +08:00
Fish
ad7ae63e92
Remove unmapped/freed memory regions from the object property list.
...
This commit fixes the following issues:
- Any unmapped/free'd memory regions (MemoryRegion instances) are not
removed from the object property linked list of its owner (which is
always qdev_get_machine(uc)). This issue makes adding new memory
mapping by calling mem_map() or mem_map_ptr() slower as more and more
memory pages are mapped and unmapped - yes, even if those memory pages
are unmapped, they still impact the speed of future memory page
mappings due to this issue.
- FlatView is not reconstructed after a memory region is freed during
unmapping, which leads to a use-after-free the next time a new memory
region is mapped in address_space_update_topology().
2016-10-20 03:48:58 -07: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
fb9cd97504
memleak: Fix m68k memleak
2016-10-03 14:47:03 -05:00
danghvu
84d99412bc
memleak: Fix Sparc memory leak
2016-10-03 14:23:27 -05:00
Nguyen Anh Quynh
7d15a60b25
arm64: disable deadcode introduced by PR #643
2016-09-29 12:34:44 +08:00
Nguyen Anh Quynh
507d557aa5
arm: disable deadcode introduced by PR #643
2016-09-29 12:33:16 +08:00
Ryan Hileman
cb615fdba7
remove uc->cpus
2016-09-23 07:38:21 -07:00
Nguyen Anh Quynh
69d976375e
Merge branch 'fix/self_modifying' of https://github.com/rhelmot/unicorn into rhelmot-fix/self_modifying
2016-08-30 21:20:22 +08:00
Nguyen Anh Quynh
8b030ae51a
fix for issue #523
2016-08-27 21:49:11 +08:00
Nguyen Anh Quynh
89c9ea5f8f
Merge branch 'fix/eflags' of https://github.com/rhelmot/unicorn into rhelmot-fix/eflags
2016-08-24 16:13:31 +08:00
Nguyen Anh Quynh
40ea64af19
Merge branch 'feat/xmm_regs' of https://github.com/rhelmot/unicorn into rhelmot-feat/xmm_regs
2016-08-23 06:52:45 +08:00
Nguyen Anh Quynh
8e1102f741
Merge pull request #620 from rhelmot/feat/invalid_floatx80_check
...
Port patch from upstream to check for invalid long double encodings
2016-08-21 09:48:26 +08:00
Andrew Dutcher
1f5d14df4d
Port patch from upstream to check for invalid long double encodings
2016-08-20 11:31:46 -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
f99030179c
fix free() -> g_free()
2016-08-11 07:49:19 -07:00
Andrew Dutcher
3a1f231e8f
eflags patch
2016-08-09 19:38:44 -07:00
Andrew Dutcher
97b10da133
Undo the disaster that was the patch to unicorn github issue #266 and fix it correctly. makes normal self-modifying code work.
2016-08-09 19:35:20 -07:00
Andrew Dutcher
4a8f52ae7f
support xmm registers
2016-08-09 19:34:34 -07:00
Nguyen Anh Quynh
fd39ec465b
arm: sync env.uc->thumb with env.thumb in arm_reg_write()
2016-07-30 13:21:44 +08:00
Nguyen Anh Quynh
a59f54ca72
Merge branch 'master' of https://github.com/esanfelix/unicorn into esanfelix-master
2016-07-30 13:18:37 +08:00
Nguyen Anh Quynh
c61aff1dbe
mips: remove an unused variable
2016-07-15 15:12:15 +08:00
danghvu
bb8f894872
windows: Remove unnecessary mman inclusion (issue #587 )
2016-07-11 13:35:49 -05:00
Hoang-Vu Dang
b9a10152f1
memleak: code_gen_buffer using g_free for non-linux
2016-07-11 10:13:13 -05:00
danghvu
27e0699ef5
mips: Fix memleak
2016-07-09 20:16:00 -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
danghvu
ada1c13662
Fix memleak: do not re-initialize halt_cond
2016-07-06 01:49:10 -05:00
Hoang-Vu Dang
de5786f98d
Fix memleak: code_gen_buffer
2016-07-05 23:48:02 -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
Eloi Sanfelix
3a1c13fda9
Set thumb mode based on PC value in ARM. Mask off last bit of PC.
2016-06-17 13:46:34 +02:00
Nguyen Anh Quynh
40ac55cf74
Merge branch 'drop-zlib' of https://github.com/radare/unicorn into radare-drop-zlib
2016-06-15 16:41:13 +07:00
pancake
fe96e8325b
Remove unused zlib dependency
2016-06-15 09:24:16 +02:00
mkravchik
4b45869437
Reading and writing NEON registers
2016-05-04 11:23:32 +03:00
Nguyen Anh Quynh
f4723916df
remove qemu_cond_destroy from qemu/header_gen.py
2016-04-23 10:23:09 +08: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
Nguyen Anh Quynh
8932463f9d
arm: qutie emulation on EXCP_YIELD exception. this fixes testcase 004-segmentation_fault_1 in #520
2016-04-20 12:04:15 +08:00
Nguyen Anh Quynh
cc6cbc5cf7
Merge branch 'memleak' into m2
2016-04-18 12:48:13 +08:00
Nguyen Anh Quynh
ba31be79f4
update qemu/powerpc.h
2016-04-17 23:37:25 +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
Nguyen Anh Quynh
721f17eb74
Merge branch 'batch_reg' of https://github.com/lunixbochs/unicorn into lunixbochs-batch_reg
2016-04-06 09:39:22 +08:00
Nguyen Anh Quynh
70da2485fc
x86: comment out restore_eflags() because it breaks some executions. see #505
2016-04-06 09:36:06 +08:00
Ryan Hileman
acd88856e1
add batched reg access
2016-04-04 20:51:38 -07:00
Ryan Hileman
66619fc6cd
remove call to restore_eflags ( #496 )
2016-04-03 23:08:17 -07:00
Chris Eagle
3add48feb5
Merge branch 'master' into smaller_nothreads
2016-03-25 19:47:52 -07:00
Chris Eagle
6991d69dad
merge from upstream
2016-03-25 19:46:44 -07:00
Ryan Hileman
977863401e
static -> dynamic code buffer, and shrink 32M->8M
2016-03-25 18:28:03 -07:00
Chris Eagle
9467254fc0
strip out per cpu thread code
2016-03-25 17:24:28 -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
Chris Eagle
4c4203cec8
fix x86 segment setup by updating cached segment registers on reg_write
2016-03-22 23:54:30 -07:00
Nguyen Anh Quynh
859111f8f5
x86: return immediately after handling FPSW/FPCW/FPTAG registers
2016-03-20 18:15:41 +08:00
Nguyen Anh Quynh
fb1ebac000
Merge branch 'master' into m1
2016-03-09 15:13:42 +08:00
Hiroyuki UEKAWA
c5888e5670
move macros in qemu/target-*/unicorn*.c
to uc_priv.h
2016-03-02 12:43:02 +09:00
Hiroyuki UEKAWA
1cd3c3093b
fix WRITE_BYTE_H
2016-03-02 10:51:50 +09:00
Jonas Zaddach
5fa6705d7a
Fixed restoring of eflags after helper call
2016-02-29 22:57:41 +01:00
Nguyen Anh Quynh
b69feb8d0b
Merge branch 'master' into memleak2
2016-02-15 15:52:10 +08:00
Nguyen Anh Quynh
8962adc9c5
sparc: use power_down to terminate emulation, rather than using trap. this fix hangup issue of tests/regress/sparc_reg.py
2016-02-15 15:51:14 +08:00
Nguyen Anh Quynh
3bd7fa4bfe
chmod -x qemu/target-i386/unicorn.c
2016-02-12 13:48:58 +08:00
coco
95beec805c
fixed memcpy that should be memmove
2016-02-11 16:38:50 +01:00
Nguyen Anh Quynh
b6897e2015
fix a compilation warning
2016-02-11 09:19:08 +08:00
Nguyen Anh Quynh
6478a24404
Merge branch 'gdt_idt' of https://github.com/cseagle/unicorn into cseagle-gdt_idt
2016-02-06 17:31:42 +08:00
Nguyen Anh Quynh
e73cbf1c88
arm: UC_QUERY_MODE return hardware mode (see issue #397 )
2016-02-06 09:47:57 +08:00
Chris Eagle
dec3615d12
ldtr and tr limit is 20 bits, not 16 bits
2016-02-04 19:26:47 -08:00
Chris Eagle
b49358524f
fix reg_read casting for x86 segment registers
2016-02-04 19:22:39 -08:00
Chris Eagle
4cb43be5bf
fix reg_read casting for x86 segment registers
2016-02-04 19:20:59 -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
c339ced218
file perms
2016-02-04 17:18:24 -08:00
Chris Eagle
f3dc2522a0
read/write of x86 segment registers should modify selector field not base field
2016-02-04 17:17:40 -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
20b01a6933
fix merge conflict
2016-02-01 12:08:38 +08:00
Nguyen Anh Quynh
cfaac6921b
c89
2016-02-01 12:05:46 +08:00
danghvu
36e53ad8a1
Fix arm & arm64 memleaks
2016-01-31 16:22:20 -06:00
Nguyen Anh Quynh
c8569d8128
arm: fix change PC feature. now tests/regress/callback-pc.py passes
2016-01-28 16:03:19 +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
2341f5dd1a
code style
2016-01-26 17:37:48 +08:00
Willi Ballenthin
a640b76b94
qemu-thread-posix: bail on mutex errors
...
partially addresses #400
2016-01-24 22:46:13 -05: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
38d1443504
Merge branch 'hook-refactor' of https://github.com/lunixbochs/unicorn into lunixbochs-hook-refactor
2016-01-23 13:24:12 +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
xorstream
b4b83ff207
moar fixes
2016-01-23 12:56:47 +11:00
xorstream
d8aaa2f44c
Fixes to runtime arm mask checks
2016-01-23 12:44:12 +11:00
xorstream
678d645b80
Fix uc_mode usage in source code
2016-01-23 12:29:22 +11:00
xorstream
8763d426c2
Fix uc_mode usage in source code
2016-01-23 12:08:49 +11:00
Nguyen Anh Quynh
6490b4f2a9
arm64: fix the issue of multiple definition of aarch64_tb_set_jmp_target (issue #387 )
2016-01-22 22:44:18 +08:00
Nguyen Anh Quynh
309abbe453
remove qemu/config-all-disas.mak
2016-01-22 17:11:57 +08:00
Nguyen Anh Quynh
3eb51116b9
arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387 )
2016-01-22 11:35:01 +08:00
Nguyen Anh Quynh
840eb54f05
Revert "arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387 )"
...
This reverts commit 3000ca6abf
.
2016-01-22 11:33:36 +08:00
Nguyen Anh Quynh
3000ca6abf
arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387 )
2016-01-22 11:33:28 +08:00
Nguyen Anh Quynh
07bd81bda6
do not redefine tb_set_jmp_target1. this partly fixes issue #387
2016-01-22 11:29:22 +08:00
Nguyen Anh Quynh
839ef672b0
only declare use_idiv_instructions_rt when __ARM_ARCH_EXT_IDIV__ is not defined
2016-01-19 00:19:28 +08:00
Nguyen Anh Quynh
3b52af4fbd
avoid confusion between macro & variable use_idiv_instructions (ARM backend)
2016-01-18 23:53:50 +08:00
Nguyen Anh Quynh
d9249b91c2
add some missing symbols for ARM backend
2016-01-18 20:42:45 +08:00
petevine
8db7f79daf
Finish adding getauxval
2016-01-18 12:48:49 +01:00
petevine
1bf85461c2
Add getauxval.c back
2016-01-18 12:47:32 +01:00
Nguyen Anh Quynh
7695fb1578
x86: no need to reset env->invalid_error in x86_reg_reset() as we always do that in cpu_exec()
2016-01-12 01:01:11 +08:00
farmdve
c9f4bd27cc
Reset env->invalid_error before executing a translation block.
2016-01-11 18:12:57 +02:00
Nguyen Anh Quynh
a0aa26d6ee
c89
2016-01-10 23:34:36 +08: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
13726b3d40
Merge branch 'master' into cygwin
2016-01-07 23:17:32 +07:00
farmdve
2304bbfc96
Remove more instances of tcg_register_jit
2016-01-07 16:39:41 +02:00
Nguyen Anh Quynh
bfeb08d1ba
fix some compilation warning
2016-01-06 14:11:21 +08:00
Nguyen Anh Quynh
e8a295991f
update qemu/header_gen.py
2016-01-06 00:44:29 +07:00
Nguyen Anh Quynh
e0cb02569e
remove unused tcg_register_jit() and related code
2016-01-05 16:02:34 +07:00
Nguyen Anh Quynh
075ccadbe9
x86: set s->pc in disas_insn() early to fix uninitialized read issue. bug reported by @farmdve
2016-01-03 08:25:51 +07:00
Nguyen Anh Quynh
19930b0514
spaces
2016-01-01 14:15:01 +08:00
Nguyen Anh Quynh
b3ebd1b7cb
Merge branch 'master' of https://github.com/iroiro123/unicorn into iroiro123-master
2016-01-01 14:01:39 +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
f10d79e95f
x86: fix a compilation warning on unused variable
2015-12-28 13:06:25 +08:00
Nguyen Anh Quynh
b5feddbf1e
indentation
2015-12-28 13:04:59 +08:00
Nguyen Anh Quynh
99b401c609
Merge branch 'la-fixed' of https://github.com/JCYang/unicorn into JCYang-la-fixed
2015-12-28 12:21:31 +08:00
Spl3en
bb375e4fa9
Reset correctly the register CR0 in protected mode by calling cpu_x86_update_cr0 instead of setting it manually.
2015-12-25 04:55:15 +01:00