Fixed some conflicts

This commit is contained in:
xorstream 2017-01-23 11:35:00 +11:00
parent 19a6dc948f
commit cbd0e6056c
11 changed files with 0 additions and 217 deletions

View File

@ -20,27 +20,7 @@
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
<<<<<<< HEAD
=======
// windows specific includes
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific includes
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -3,27 +3,6 @@
/* Sample code to demonstrate how to emulate ARM code */ /* Sample code to demonstrate how to emulate ARM code */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -3,27 +3,6 @@
/* Sample code to demonstrate how to emulate ARM64 code */ /* Sample code to demonstrate how to emulate ARM64 code */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -1,9 +1,3 @@
<<<<<<< HEAD
=======
#include <stdio.h>
#include <string.h>
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -3,27 +3,6 @@
/* Sample code to demonstrate how to emulate m68k code */ /* Sample code to demonstrate how to emulate m68k code */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -3,27 +3,6 @@
/* Sample code to demonstrate how to emulate Mips code (big endian) */ /* Sample code to demonstrate how to emulate Mips code (big endian) */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -3,27 +3,6 @@
/* Sample code to demonstrate how to emulate Sparc code */ /* Sample code to demonstrate how to emulate Sparc code */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -20,18 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
<<<<<<< HEAD
=======
#include <assert.h>
>>>>>>> unicorn-engine/msvc
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
<<<<<<< HEAD
#
=======
>>>>>>> unicorn-engine/msvc
#pragma pack(push, 1) #pragma pack(push, 1)
struct SegmentDescriptor { struct SegmentDescriptor {
union { union {

View File

@ -3,27 +3,6 @@
/* Sample code to trace code with Linux code with syscall */ /* Sample code to trace code with Linux code with syscall */
<<<<<<< HEAD
=======
// windows specific
#ifdef _MSC_VER
#include <io.h>
#include <windows.h>
#define PRIx64 "llX"
#ifdef DYNLOAD
#include "unicorn_dynload.h"
#else // DYNLOAD
#include <unicorn/unicorn.h>
#ifdef _WIN64
#pragma comment(lib, "unicorn_staload64.lib")
#else // _WIN64
#pragma comment(lib, "unicorn_staload.lib")
#endif // _WIN64
#endif // DYNLOAD
// posix specific
#else // _MSC_VER
>>>>>>> unicorn-engine/msvc
#include <unicorn/unicorn.h> #include <unicorn/unicorn.h>
#include <string.h> #include <string.h>

View File

@ -1,4 +1,3 @@
<<<<<<< Updated upstream
CFLAGS += -Wall -Werror -I../../include CFLAGS += -Wall -Werror -I../../include
LDLIBS += -L../../ -lm -lunicorn LDLIBS += -L../../ -lm -lunicorn
@ -15,42 +14,6 @@ TESTS = $(TESTS_SOURCE:%.c=%)
.PHONY: all clean test .PHONY: all clean test
test: $(TESTS) test: $(TESTS)
=======
CFLAGS += -I../../include
ifeq (MING,$(findstring MING,$(shell uname -s)))
LDFLAGS += ../../unicorn.lib $(shell pkg-config --libs glib-2.0) -lpthread -lm
else
LDFLAGS += ../../libunicorn.a $(shell pkg-config --libs glib-2.0) -lpthread -lm
endif
TESTS = map_crash map_write
TESTS += sigill sigill2
TESTS += block_test
TESTS += ro_mem_test nr_mem_test
TESTS += timeout_segfault
TESTS += rep_movsb
TESTS += mem_unmap
TESTS += mem_double_unmap
TESTS += mem_protect
TESTS += mem_exec
TESTS += mips_kseg0_1
TESTS += eflags_nosync
TESTS += 00opcode_uc_crash
TESTS += eflags_noset
TESTS += mem_map_large
TESTS += invalid_read_in_cpu_tb_exec
TESTS += invalid_write_in_cpu_tb_exec_x86_64
TESTS += x86_16_segfault
TESTS += mips_invalid_read_of_size_4_when_tracing
TESTS += invalid_read_in_tb_flush_x86_64
TESTS += sparc_jump_to_zero
TESTS += mips_delay_slot_code_hook
TESTS += mem_nofree
TESTS += rw_hookstack
TESTS += threaded_emu_start
>>>>>>> Stashed changes
all: $(TESTS) all: $(TESTS)

View File

@ -52,42 +52,26 @@ int main(int argc, char *argv[])
err = uc_mem_map(uc, ADDRESS, SIZE, UC_PROT_ALL); err = uc_mem_map(uc, ADDRESS, SIZE, UC_PROT_ALL);
if(err != UC_ERR_OK) { if(err != UC_ERR_OK) {
printf("Failed to map memory %s\n", uc_strerror(err)); printf("Failed to map memory %s\n", uc_strerror(err));
<<<<<<< Updated upstream
return 1; return 1;
=======
return 2;
>>>>>>> Stashed changes
} }
err = uc_mem_write(uc, ADDRESS, CODE32, sizeof(CODE32) - 1); err = uc_mem_write(uc, ADDRESS, CODE32, sizeof(CODE32) - 1);
if(err != UC_ERR_OK) { if(err != UC_ERR_OK) {
printf("Failed to write to memory %s\n", uc_strerror(err)); printf("Failed to write to memory %s\n", uc_strerror(err));
<<<<<<< Updated upstream
return 1; return 1;
=======
return 3;
>>>>>>> Stashed changes
} }
loop: loop:
err = uc_mem_map(uc, stkval, STACK_SIZE, UC_PROT_ALL); err = uc_mem_map(uc, stkval, STACK_SIZE, UC_PROT_ALL);
if(err != UC_ERR_OK) { if(err != UC_ERR_OK) {
printf("Failed to map memory %s\n", uc_strerror(err)); printf("Failed to map memory %s\n", uc_strerror(err));
<<<<<<< Updated upstream
return 1; return 1;
=======
return 4;
>>>>>>> Stashed changes
} }
err = uc_mem_write(uc, ESP, &val, sizeof(val)); err = uc_mem_write(uc, ESP, &val, sizeof(val));
if(err != UC_ERR_OK) { if(err != UC_ERR_OK) {
printf("Failed to write to memory %s\n", uc_strerror(err)); printf("Failed to write to memory %s\n", uc_strerror(err));
<<<<<<< Updated upstream
return 1; return 1;
=======
return 5;
>>>>>>> Stashed changes
} }
@ -101,11 +85,7 @@ loop:
printf("Failed on uc_emu_start() with error returned %u: %s\n", err, uc_strerror(err)); printf("Failed on uc_emu_start() with error returned %u: %s\n", err, uc_strerror(err));
uc_close(uc); uc_close(uc);
<<<<<<< Updated upstream
return 1; return 1;
=======
return 6;
>>>>>>> Stashed changes
} }
uc_reg_read(uc, UC_X86_REG_EAX, &EAX); uc_reg_read(uc, UC_X86_REG_EAX, &EAX);