Commit Graph

105 Commits

Author SHA1 Message Date
lazymio
3dd2e0f95d
Basic implementation of uc_ctl 2021-11-01 00:39:36 +01:00
lazymio
84abf1d3a4
A stronger test and handle addr_end = 0 2021-10-31 21:01:55 +01:00
lazymio
4bcf1c4a7c
Flush TB at exit with a better approach instead of flushing tlb in uc1 2021-10-31 19:43:56 +01:00
lazymio
8e6f7e4fba
Add a regression test 2021-10-31 15:56:58 +01:00
lazymio
e62b0ef255
Add clang-format and format code to qemu code style 2021-10-29 12:44:49 +02:00
lazymio
9131856506
More tests 2021-10-26 11:32:57 +02:00
Aurimas Blažulionis
160045a910
Binary search mapped blocks 2021-10-20 20:49:55 +01:00
mio
91451aa2f5
Add a new unit test file 2021-10-20 21:27:22 +02:00
mio
30f0e24407
Merge remote-tracking branch 'qducasse/riscv_pc_update' into dev 2021-10-19 23:08:41 +02:00
Quentin DUCASSE
5fd90ca1ef Added 3 steps unit test 2021-10-19 17:20:10 +02:00
Quentin DUCASSE
47f986fc93 Unit test POC for RISCV issue 2021-10-19 17:12:52 +02:00
mio
6d0d0897f8
Fix Rust build and CI.
Add a test for ppc and fix ppc on windows.
2021-10-17 02:11:38 +02:00
mio
9d8a309fbf
Allow user to instrument cpuid instruction 2021-10-05 17:15:49 +02:00
mio
bccc7f2fb7
Remove NULL tcg arg and add a test for sysenter 2021-10-04 18:50:42 +02:00
mio
2d043d387d
Change mips model to add DSP 2021-10-03 23:10:39 +02:00
Nguyen Anh Quynh
aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00
Nguyen Anh Quynh
ac68fd441d fix test_x86.c 2020-05-25 00:04:07 +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
Chen Huitao
2c66acf4ee
fix #1246 (#1254)
* fix finding python path which only has python3.

* fix #1246, arm host issue.

* skip assembler tests on non-x86 host.

* update macro of dummy value.

* fix MSVC macro.

* update dummy array value macro.

* restore to original qemu code.
2020-05-18 19:57:44 +08:00
Dominik Maier
9fedbd96f4
fixed leaks in test cases (#1247) 2020-05-02 18:18:18 +08:00
David CARLIER
72f7598387 Tests, fixes on third platform. (#1168)
MT linkage fix mainly.
2019-12-29 00:18:40 +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
Jean-Baptiste Cayrou
b1995b4b8a Fix C syntax mistake in test_gdt_idt_x86.c (#867)
Now 'make test' command works
2017-08-07 10:31:10 +08:00
Stephen
da21bd0589 Start moving examples in S files (#851)
* Move assembly to S files

* more assembly files

* osx compilation change

* makefile mistake

* add objcopy from crosstool

* use gobjcopy on osx

* start cmocka install cleanup

* move wget to directory option

* move back to cd

* fix copy

* First cut

* free allocated memory

* bad idea

too much switching between python and c

* add debug

* cleanup bad size
2017-06-25 10:14:22 +08:00
Stephen
7f116846c0 MSYS test (#852)
* MSYS test

using new cmocka msys package

* Update .appveyor.yml

* temp package install

before real ones get uploaded to db

* Update .appveyor.yml

* Update .appveyor.yml

* Update .appveyor.yml

* Update Makefile

* Update test_x86_shl_enter_leave.c

* Update Makefile

* Update threaded_emu_start.c

* Update .appveyor.yml

* remove unused install
2017-06-25 10:11:35 +08:00
Nguyen Anh Quynh
206819bd98 cleanup after msvc port 2017-01-22 21:27:17 +08:00
Nguyen Anh Quynh
f9f184e719 test: fix missng pthread functions 2017-01-21 22:29:07 +08:00
xorstream
770c5616e2 Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
xorstream
837d3787c0 Fix for read()/write() conflict with unistd.h in test_mem_map.c. 2017-01-21 01:39:49 +11:00
xorstream
fac6a66860 platform.h move #3 2017-01-21 00:13:21 +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
me
87e8532e67 regress: link on Linux with -lrt 2016-12-26 14:16:56 +08:00
Stephen
75d90aff52 Make cleanup (#666)
* make cleanup

* Update .travis.yml
Update eflags_nosync.c
Update sigill2.c
Update ro_mem_test.c
Update ro_mem_test.c
Update nr_mem_test.c
Update mem_fuzz.c
Update mem_double_unmap.c
Update emu_stop_in_hook_overrun.c
Update eflags_nosync.c
remove unused
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update mem_64_c.c
Update mem_64_c.c
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update .travis.yml
try android ndk build
Update unicorn.py
Update unicorn.py
Update Makefile
Update unicorn.py
Update unicorn.py
remove an untrue comment

if a dll/so/dylib gets loaded at runtime is dependent on many different factors, primarily the LD/DYLD paths. Those do not always include the current working directory
Update Makefile
Update .appveyor.yml
Update .travis.yml
Update Makefile
Update .appveyor.yml
Fix bad sample

* Update Makefile

* Update Makefile

* Update install-cmocka-linux.sh

* remove verbose option from tar

* add upgrade to pacman for cmake

* pacman double update, needed to get new packages

* enable cmocka unit testing

* rejigger commands to fail on any step

should get fails in msys builds for cmocka

* fix quote

* make cmocka in cygwin only

* add msys cache
2016-11-19 17:17:48 +08:00
Stephen
bc08bfda67 Unit testing in CI (#651)
- in appveyor, install clang and cmake in cygwin, enable package upgrades, and build cmocka and enable testing for gcc only
- in `gitignore`, ignore generated cmocka folder
- in travis, use brew in osx to install cmocka, and enable testing for gcc and clang on os x and linux
- in `Makefile`, change to use `uname -s` to determine os type
- make `install-cmocka-linux.sh`, a simple shell script to download and install cmocka on linux
- in `bindings/Makefile`, enable `make -c` to call subdirectory makefiles instead of `cd [dir] && make` and include environment variables for runtime access to generated libraries
- in `samples/Makefile`, change to use `uname -s` to determine os type, remove `clean_bins` from `all` command, and include `Werror` for compile strictness
- in `tests/unit/Makefile`, add `cflags` for compile time access to cmocka headers and library, include execute vars for runtime access to cmocka and unicorn libs
- in `tests/unit/test_tb_x86.c`, comment out assert that would not compile
2016-10-22 00:21:10 +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
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
Stephen
0137a66c61 Update test_hang.c 2016-10-05 10:29:16 -07:00
Stephen
f2998f14cd Update test_hang.c 2016-10-05 09:20:36 -07: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
3deb9fdcad Fix save/restore to work while emulation is not active 2016-09-08 14:41:34 -07:00
Andrew Dutcher
f2af98942b Added (failing?) test for reg save/restore 2016-08-31 20:25:28 -05: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
nnn
64e6fbc480 Fixed printf format specifier 2016-08-20 22:34:14 -07:00
nnn
d77fd18915 Fixed multiple bugs in test_x86_rip_bug.c
Fixed format warning in test_hang.c
2016-08-20 22:23:51 -07:00
nnn
4a67727f81 Updated Makefile 2016-08-20 18:47:45 -07:00
Neil
06fc5d1ea9 Add files via upload
Unit Test for Issue #534
2016-08-20 21:35:23 -04:00