Commit Graph

2135 Commits

Author SHA1 Message Date
lazymio
225d387325
Fix wrong sync after UC_ERR_[READ, WRITE, FETCH]_[UNMAPPED, PROT] (#1368)
* Fix wrong sync after UC_ERR_[READ, WRITE, FETCH]_[UNMAPPED, PROT]

Note that:
1. We only guarantee the pc (and other internal states) is correct
if and only of `uc_emu_start` returns without any error (or errors
have been handled in callbacks.).
2. If memory read/write error isn't handled by hooks, the state is
undefined and the pc is probably wrong if no hook is installed.

This fixes #1323.

* Rename variables

* Add note in unicorn.h

* Refine test_i386_invalid_mem_read_in_tb
2021-05-12 00:10:45 +08:00
Sven Almgren
58c50c4be7
X86 instruction FTST was incorrectly overwriting ST0 instead of FT0 (#1372)
* X86 instruction FTST was incorrectly overwriting ST0 instead of FT0

* credits update
2021-05-08 18:45:14 +08:00
Nguyen Anh Quynh
d664a838f7
Update CREDITS.TXT 2021-05-05 23:35:50 +08:00
insane-shane
4f9a6cfcf3
Handle exceptions raised in Python hook functions (#1387) 2021-04-26 00:35:56 +08:00
lazymio
b0f1e46f61
Fix fpip (#1385)
* Revert partial #74

* Import fix from https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg02868.html

* Fix capstone usage
2021-04-26 00:32:42 +08:00
Bet4
811e77c7aa
Support querying architecture mode besides arm (#1389) 2021-04-26 00:31:29 +08:00
lazymio
f1f59bac55
The UC instance must be created twice to reproduce the problem (#1382)
* The UC instance must be created twice to reproduce the problem

* Fix coding style
2021-04-10 03:30:24 +08:00
w4kfu-synacktiv
21ec6e8f83
Add ARM BE8 support (#1369)
Co-authored-by: w4kfu <gw4kfu@gmail.com>
2021-03-31 21:22:35 +08:00
Duncan Ogilvie
4440310f14
Modernize CMake (#1373) 2021-03-30 23:32:56 +08:00
lazymio
bf1713d9e0
Add arm ite blocks samples from #853 (#1381) 2021-03-30 12:06:26 +08:00
Rami Ali
34ddafcbcf
Fix pausing within Thumb2 ITE blocks (#853) (#880)
Co-authored-by: Rami Ali <flowergrass@users.noreply.github.com>
2021-03-29 22:54:45 +08:00
David CARLIER
7ca7e8a79d
qemu_getauxval FreeBSD implementation backport (#1366) 2020-12-31 18:53:36 +08:00
iGio90
e42e58cd91
Remove deprecated javah and build with javac (#1360)
Hi, I was having trouble building java bindings on latest ubuntu. I installed jdk8 which has javah but somehow was failing during install (missing compiled classes even if they were in place in unicorn/). I guess mixing with jdk11 pop the issue. 
Using javac from most recent jdk works very fine.
2020-12-23 13:28:17 +08:00
Carlo Bramini
4b34042e02
Make Unicorn buildable with MinGW (#1364)
* [WIN32] Allow to build also with MinGW

* [WIN32] Fix build for MinGW
2020-12-23 13:27:06 +08:00
Nguyen Anh Quynh
0bebb3e183 cmake: enable UNICORN_HAS_ARMEB when ARM is on 2020-11-17 15:13:16 +08:00
Peter Meerwald-Stadler
770d5679c3
Fix some typos in include files (#1350) 2020-10-29 11:16:45 +08:00
smeng9
5e4423a419
Update binding list (#1349) 2020-10-28 09:47:59 +08:00
pkubaj
95bc0bdc21
Fix build with LLVM on powerpc64(le) (#1347)
Conflicting symbols need to be undefined before including altivec.h.
2020-10-25 07:34:57 +08:00
Nguyen Anh Quynh
4c054b9f0d update SPONSORS.TXT 2020-10-23 00:03:54 +08:00
Nguyen Anh Quynh
886acbf599 add SPONSORS.TXT 2020-10-21 19:34:41 +08:00
Nguyen Anh Quynh
b1d7782c07 update pkgconfig.mk for 1.0.2 2020-10-21 13:42:20 +08:00
Nguyen Anh Quynh
eb38c5b2e5 update ChangeLog for 1.0.2 2020-10-20 22:13:43 +08:00
LAADHARI
e639d3fc93
FIX java binding compilation #1339 (#1340) 2020-10-07 11:43:26 +08:00
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
Nguyen Anh Quynh
198e432a1d update Changelog for 1.0.2-rc6 2020-09-24 22:55:14 +08:00
Nguyen Anh Quynh
0291ac7675 update CREDITS.TXT 2020-09-24 22:37:59 +08:00
Nguyen Anh Quynh
95e539f3e6 samples: make sample_x86.c to use uc_context_free() to free context (instead of uc_free()) 2020-09-24 22:37:01 +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
chfl4gs
21235916b9
removing testpypi (#1332)
* Adding Travis-CI cmake static

* fix 64-bit fstenv (#1300)

* fix 64-bit fstenv

* fix fstenv

* safe_zip to false and travis adjustment

* Fixed zip_safe and cygwin setup

* Removing testpypi

Co-authored-by: liangjs <761232680@qq.com>
2020-09-22 03:36:07 +08:00
Nguyen Anh Quynh
6c63235ebe be ready for 1.0.2-rc5 2020-09-22 02:11:43 +08:00
lazymio
644da9babc
Fix setjmp/longjmp on native Windows (#1331)
* Add setjmp wrapper

* Add to projects

* Use wrapper on x64

* Always build on x64 and exclude on win32

* Fix signature

* Add comments

* Add comments for os-win32.h

* Add extern decleration

* Support cmake Windows build

* Fix for MinGW
2020-09-22 02:02:43 +08:00
liangjs
225f6f2889
Return 'indefinite integer value' for invalid SSE fp->int conversions (#1306)
Merge from qemu commit 1e8a98b53867f61da9ca09f411288e2085d323c4.
1e8a98b538
2020-09-21 10:39:00 +08:00
☃ Stephen Shkardoon ☃
b1459f7554
Fix failing test caused by removal of UC_ERR_TIMEOUT (#1305)
Caused by fbef45b18f.
Now the code assumes if it completes without an error, it was
successful.
2020-09-21 10:37:38 +08:00
mogoreanu
748aceb760
Add qemu_ prefix to bitmap_set and bitmap_clear to avoid conflicts. (#1326)
When unicorn and systemd are combined into a single binary the 2
libraries conflict on bitmap_set and bitmap_clear functions which breaks
unicorn.

Co-authored-by: Nicolae Mogoreanu <mogo@google.com>
2020-09-16 17:09:10 +08:00
Sunho Kim
abe452babc
Fix enabled hooks even after deleting them (#1315) 2020-09-10 10:03:36 +08:00
lazymio
c1c0baec7d
Fix IP value for UC_MODE_16 (#1321) 2020-09-10 10:02:22 +08:00
chfl4gs
c03f50f76a
Fixing installation on cygwin, Travis-ci cache adjustment (#1322)
* Adding Travis-CI cmake static

* fix 64-bit fstenv (#1300)

* fix 64-bit fstenv

* fix fstenv

* safe_zip to false and travis adjustment

* Fixed zip_safe and cygwin setup

Co-authored-by: liangjs <761232680@qq.com>
2020-09-10 10:01:13 +08:00
h01G3r
a9025c58a4
fixes an issue with ARM APSR register handling: (#1317)
- Q flag / GE flag were not included in APSR register (read/write)
  - UC_ARM_REG_APSR_NZCV register constant was ignored completely.
  - regression test added
2020-08-20 23:24:04 +08:00
liangjs
3134f33029
fix 64-bit fstenv (#1300)
* fix 64-bit fstenv

* fix fstenv
2020-06-28 01:43:14 +08:00
chfl4gs
a8a6a3fa9a
PyPI test check (#1296)
* Adding Travis-CI cmake static

* adding pypi test
2020-06-14 01:46:10 +08:00
Nguyen Anh Quynh
564ae2b14a python: correct a comment on hooking on sample_arm64.py. fix #1292 2020-06-10 17:56:01 +08:00
Nguyen Anh Quynh
7ea04acbdc fix some uninitialized vars in fpu 2020-06-07 11:22:18 +08:00
chfl4gs
535143ae5a
Fixing minor typo on PyPI distribution workflow (#1286)
* Adding Travis-CI cmake static

* Fix minor typo on PyPI workflow config
2020-06-07 01:09:30 +08:00
John Zimmermann
590bab8f1a
cmake: fix build if workdir is outside of CMAKE_BINARY_DIR (#1284)
this e.g. happens if you would try to compile this like this:

cmake -B build
cmake --build build --config Release
2020-06-06 12:54:06 +08:00
chfl4gs
9288b4a845
adding pypi workflow (#1280)
* adding pypi workflow

* PyPI distribution packages workflow
2020-06-06 12:53:31 +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
Dominik Maier
a4784cc96c
fix error handling of mmap() calls (#1283) 2020-06-05 10:30:23 +08:00
scribam
ad80f042c4
cmake: add ARCHIVE rule to the install command (#1282) 2020-06-05 10:27:41 +08:00
chfl4gs
10f0562796
Adding Travis-CI cmake static (#1279) 2020-06-04 15:40:11 +08:00