Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tandasat committed May 4, 2016
2 parents 882052a + 8883428 commit 2c44f91
Show file tree
Hide file tree
Showing 38 changed files with 173 additions and 185 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ test_iter_benchmark


*.s
.DS_Store
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ set(HEADERS_ENGINE
MCInstrDesc.h
SStream.h
cs_priv.h
myinttypes.h
include/platform.h
)

Expand Down
3 changes: 2 additions & 1 deletion SStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#endif
#include <string.h>

#include "myinttypes.h"
#include <platform.h>

#include "SStream.h"
#include "cs_priv.h"
#include "utils.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/AArch64/AArch64InstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#ifdef CAPSTONE_HAS_ARM64

#include "../../myinttypes.h"
#include <platform.h>
#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../../myinttypes.h"
#include <platform.h>

#include "ARMAddressingModes.h"
#include "ARMBaseInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h> // DEBUG
#include <stdlib.h>
#include <string.h>
#include "../../myinttypes.h"
#include <platform.h>

#include "ARMInstPrinter.h"
#include "ARMAddressingModes.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/Mips/MipsDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>

#include "../../myinttypes.h"
#include <platform.h>

#include "../../utils.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/Mips/MipsInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#ifdef CAPSTONE_HAS_MIPS

#include "../../myinttypes.h"
#include <platform.h>
#include <stdlib.h>
#include <stdio.h> // debug
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/PowerPC/PPCGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include "../../myinttypes.h"
#include <platform.h>

/// printInstruction - This method is automatically generated by tablegen
/// from the instruction set description.
Expand Down
2 changes: 1 addition & 1 deletion arch/Sparc/SparcGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include "../../myinttypes.h"
#include <platform.h>


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/SystemZ/SystemZGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include "../../myinttypes.h"
#include <platform.h>


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/SystemZ/SystemZInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../myinttypes.h"
#include <platform.h>

#include "SystemZInstPrinter.h"
#include "../../MCInst.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/X86/X86ATTInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#if !defined(CAPSTONE_HAS_OSXKERNEL)
#include <ctype.h>
#endif
#include "../../myinttypes.h"
#include <platform.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <libkern/libkern.h>
#else
Expand Down
1 change: 0 additions & 1 deletion arch/X86/X86Disassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#ifdef CAPSTONE_HAS_X86

#include "../../myinttypes.h" // debug
#include <string.h>

#include "../../cs_priv.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/X86/X86IntelInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#if !defined(CAPSTONE_HAS_OSXKERNEL)
#include <ctype.h>
#endif
#include "../../myinttypes.h"
#include <platform.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <libkern/libkern.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion arch/XCore/XCoreGenAsmWriter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h> // debug
#include "../../myinttypes.h"
#include <platform.h>


/// printInstruction - This method is automatically generated by tablegen
Expand Down
2 changes: 1 addition & 1 deletion arch/XCore/XCoreInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../myinttypes.h"
#include <platform.h>

#include "XCoreInstPrinter.h"
#include "../../MCInst.h"
Expand Down
4 changes: 4 additions & 0 deletions cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64

handle->errnum = CS_ERR_OK;

// reset IT block of ARM structure
if (handle->arch == CS_ARCH_ARM)
handle->ITBlock.size = 0;

#ifdef CAPSTONE_USE_SYS_DYN_MEM
if (count > 0 && count <= INSN_CACHE_SIZE)
cache_size = (unsigned int) count;
Expand Down
4 changes: 2 additions & 2 deletions include/capstone.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ typedef struct cs_opt_mem {

// Runtime option for the disassembled engine
typedef enum cs_opt_type {
CS_OPT_INVALID = 0, // No opetion specified
CS_OPT_INVALID = 0, // No option specified
CS_OPT_SYNTAX, // Assembly output syntax
CS_OPT_DETAIL, // Break down instruction structure into details
CS_OPT_MODE, // Change engine's mode at run-time
Expand Down Expand Up @@ -512,7 +512,7 @@ cs_insn * CAPSTONE_API cs_malloc(csh handle);
@handle: handle returned by cs_open()
@code: buffer containing raw binary code to be disassembled
@code_size: size of above code
@size: size of above code
@address: address of the first insn in given raw code buffer
@insn: pointer to instruction to be filled in by this API.
Expand Down
10 changes: 0 additions & 10 deletions myinttypes.h

This file was deleted.

2 changes: 1 addition & 1 deletion suite/arm/test_arm_regression.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../myinttypes.h"

#include <platform.h>
#include <capstone.h>

static csh handle;
Expand Down
2 changes: 1 addition & 1 deletion suite/benchmark/test_iter_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

static void test()
Expand Down
2 changes: 1 addition & 1 deletion tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

static csh handle;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

static csh handle;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// This sample code demonstrates the APIs cs_malloc() & cs_disasm_iter().
#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013> */

#include <stdio.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_skipdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include <stdio.h>
#include <stdlib.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sparc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_systemz.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* By Nguyen Anh Quynh <[email protected]>, 2013-2014 */

#include <stdio.h>
#include "../myinttypes.h"

#include <platform.h>
#include <capstone.h>

struct platform {
Expand Down
Loading

0 comments on commit 2c44f91

Please sign in to comment.