Merge branch 'next' of https://github.com/radare/capstone into test2

This commit is contained in:
Nguyen Anh Quynh 2015-02-28 08:29:21 +08:00
commit 96ee76fa2a
50 changed files with 42 additions and 44 deletions

View File

@ -21,7 +21,7 @@
#include <stdint.h>
#include "include/capstone.h"
#include "include/capstone/capstone.h"
typedef struct MCInst MCInst;
typedef struct cs_struct cs_struct;

View File

@ -19,7 +19,7 @@
#define CS_LLVM_MC_MCINSTRDESC_H
#include <stdint.h>
#include "include/platform.h"
#include "capstone/platform.h"
//===----------------------------------------------------------------------===//
// Machine Operand Flags and Description

View File

@ -20,7 +20,7 @@
#define CS_LLVM_MC_MCREGISTERINFO_H
#include <stdint.h>
#include "include/platform.h"
#include "capstone/platform.h"
/// An unsigned integer type large enough to represent all physical registers,
/// but not necessarily virtual registers.

View File

@ -237,7 +237,7 @@ LIBOBJ += $(OBJDIR)/MCInst.o
PKGCFGDIR ?= $(LIBDATADIR)/pkgconfig
API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}')
API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}')
VERSION_EXT =
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
@ -374,7 +374,7 @@ ifeq ($(CAPSTONE_STATIC),yes)
$(INSTALL_DATA) $(ARCHIVE) $(LIBDIR)
endif
mkdir -p $(INCDIR)/$(LIBNAME)
$(INSTALL_DATA) include/*.h $(INCDIR)/$(LIBNAME)
$(INSTALL_DATA) include/capstone/*.h $(INCDIR)/$(LIBNAME)
mkdir -p $(PKGCFGDIR)
$(INSTALL_DATA) $(PKGCFGF) $(PKGCFGDIR)/
@ -454,7 +454,7 @@ define generate-pkgcfg
echo 'Description: Capstone disassembly engine' >> $(PKGCFGF)
echo 'Version: $(PKG_VERSION)' >> $(PKGCFGF)
echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
echo 'includedir=$(INCDIR)/capstone' >> $(PKGCFGF)
echo 'includedir=$(INCDIR)' >> $(PKGCFGF)
echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF)
echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF)
echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_ARM64_MAP_H
#define CS_ARM64_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *AArch64_reg_name(csh handle, unsigned int reg);

View File

@ -17,7 +17,7 @@
#ifndef CS_LLVM_TARGET_ARM_ARMADDRESSINGMODES_H
#define CS_LLVM_TARGET_ARM_ARMADDRESSINGMODES_H
#include "../../include/platform.h"
#include "capstone/platform.h"
#include "../../MathExtras.h"
/// ARM_AM - ARM Addressing Mode Stuff

View File

@ -20,7 +20,7 @@
#ifndef CS_ARMBASEINFO_H
#define CS_ARMBASEINFO_H
#include "../../include/arm.h"
#include "capstone/arm.h"
// Defines symbolic names for ARM registers. This defines a mapping from
// register name to register number.

View File

@ -4,7 +4,7 @@
#ifndef CS_ARMDISASSEMBLER_H
#define CS_ARMDISASSEMBLER_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
void ARM_init(MCRegisterInfo *MRI);

View File

@ -4,7 +4,7 @@
#ifndef CS_ARM_MAP_H
#define CS_ARM_MAP_H
#include "../../include/capstone.h"
#include "../../include/capstone/capstone.h"
#include "../../utils.h"
// return name of regiser in friendly string

View File

@ -4,9 +4,7 @@
#ifndef CS_MIPSDISASSEMBLER_H
#define CS_MIPSDISASSEMBLER_H
#include "../../include/capstone.h"
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
void Mips_init(MCRegisterInfo *MRI);

View File

@ -4,7 +4,7 @@
#ifndef CS_MIPS_MAP_H
#define CS_MIPS_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *Mips_reg_name(csh handle, unsigned int reg);

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_PPC_MAP_H
#define CS_PPC_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *PPC_reg_name(csh handle, unsigned int reg);

View File

@ -17,7 +17,7 @@
#ifndef CS_POWERPC_PPCPREDICATES_H
#define CS_POWERPC_PPCPREDICATES_H
#include "../../include/ppc.h"
#include "capstone/ppc.h"
// NOTE: duplicate of ppc_bc in ppc.h to maitain code compatibility with LLVM
typedef enum ppc_predicate {

View File

@ -18,7 +18,7 @@
#ifndef CS_SPARC_TARGET_SPARC_H
#define CS_SPARC_TARGET_SPARC_H
#include "../../include/sparc.h"
#include "capstone/sparc.h"
inline static char *SPARCCondCodeToString(sparc_cc CC)
{

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_SPARC_MAP_H
#define CS_SPARC_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *Sparc_reg_name(csh handle, unsigned int reg);

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_SYSZ_MAP_H
#define CS_SYSZ_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *SystemZ_reg_name(csh handle, unsigned int reg);

View File

@ -79,7 +79,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_X86_MAP_H
#define CS_X86_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../cs_priv.h"
// map sib_base to x86_reg

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_XCORE_MAP_H
#define CS_XCORE_MAP_H
#include "../../include/capstone.h"
#include "capstone/capstone.h"
// return name of regiser in friendly string
const char *XCore_reg_name(csh handle, unsigned int reg);

View File

@ -8,7 +8,7 @@
#include <caml/alloc.h>
#include <caml/fail.h>
#include "../../include/capstone.h"
#include "capstone/capstone.h"
#define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))

2
cs.c
View File

@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <capstone.h>
#include <capstone/capstone.h>
#include "utils.h"
#include "MCRegisterInfo.h"

View File

@ -4,7 +4,7 @@
#ifndef CS_PRIV_H
#define CS_PRIV_H
#include <capstone.h>
#include <capstone/capstone.h>
#include "MCInst.h"
#include "SStream.h"

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
static csh handle;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
static csh handle;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -6,7 +6,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
static csh handle;

View File

@ -4,7 +4,7 @@
#include <stdio.h>
#include "../inttypes.h"
#include <capstone.h>
#include <capstone/capstone.h>
struct platform {
cs_arch arch;

View File

@ -5,7 +5,7 @@
#define CS_UTILS_H
#include <stddef.h>
#include "include/capstone.h"
#include "include/capstone/capstone.h"
#include "cs_priv.h"
// threshold number, so above this number will be printed in hexa mode