Remove all references to the deprecated CPARSE code

This commit is contained in:
pancake 2015-10-23 00:30:33 +02:00
parent 016fff515a
commit efa8fd9990
6 changed files with 9 additions and 69 deletions

View File

@ -18,7 +18,6 @@ MKPLUGINS=mk/stat.mk mk/sloc.mk
COMPILER=@USERCC@
STATIC_DEBUG=0
RUNTIME_DEBUG=1
HAVE_CPARSE=@CPARSE@
INSTALL_DIR=@INSTALL_DIR@
INSTALL_DATA=@INSTALL_DATA@

19
configure vendored
View File

@ -17,7 +17,6 @@ control_c() {
exit 1
}
trap control_c 2
CPARSE=0
DEBUGGER=1
USE_MAGIC=0
LOADLIBS=1
@ -163,7 +162,6 @@ EOF2
printf "
Optional Features:
--enable-cparse build with cparse support
--disable-debugger disable native debugger features
--with-sysmagic force to use system's magic
--disable-loadlibs disable loading plugins
@ -235,7 +233,7 @@ echo "LANGS: c"
echo "REQUIRED: libdl"
echo "OPTIONAL: libmagic"
echo "PKG-CONFIG: capstone openssl"
echo "FLAGS: --enable-cparse --disable-debugger --with-sysmagic --disable-loadlibs --without-fork --with-syscapstone --with-syszip --without-gpl --with-openssl --with-rpath --with-little-endian --with-big-endian --with-compiler=gcc --with-ostype=auto --without-pic --with-nonpic --with-libversion=xxx"
echo "FLAGS: --disable-debugger --with-sysmagic --disable-loadlibs --without-fork --with-syscapstone --with-syszip --without-gpl --with-openssl --with-rpath --with-little-endian --with-big-endian --with-compiler=gcc --with-ostype=auto --without-pic --with-nonpic --with-libversion=xxx"
exit 0
;;
--cache-file)
@ -279,7 +277,6 @@ echo "FLAGS: --enable-cparse --disable-debugger --with-sysmagic --disable-lo
--mandir)
MANDIR="$value"; ;;
"--enable-cparse") CPARSE="1"; ;;
"--disable-debugger") DEBUGGER="0"; ;;
"--with-sysmagic") USE_MAGIC="1"; ;;
"--disable-loadlibs") LOADLIBS="0"; ;;
@ -313,7 +310,7 @@ parse_options $1
shift
done
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C CPARSE DEBUGGER HAVE_LIB_DL DL_LIBS LIL_ENDIAN BIG_ENDIAN BYTEORDER HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC LOADLIBS HAVE_FORK WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP WITH_GPL HAVE_LIB_GMP HAVE_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL USE_RPATH HAVE_LILEND HAVE_BIGEND HAVE_LIB_LUA5_1 USERCC USEROSTYPE WITHPIC WITHNONPIC LIBVERSION"
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS LIL_ENDIAN BIG_ENDIAN BYTEORDER HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC LOADLIBS HAVE_FORK WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP WITH_GPL HAVE_LIB_GMP HAVE_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL USE_RPATH HAVE_LILEND HAVE_BIGEND HAVE_LIB_LUA5_1 USERCC USEROSTYPE WITHPIC WITHNONPIC LIBVERSION"
create_environ
@ -360,8 +357,8 @@ else
echo "libc"
fi
printf "checking host endianness... "
LIL_ENDIAN=$(printf I|od|awk '{print substr($2,6,1);exit}')
if [ 0 = 1 -o "${LIL_ENDIAN}" = 1 ]; then
LIL_ENDIAN=$(printf I|od -to2|awk '{print substr($2,6,1);exit}')
if [ "${LIL_ENDIAN}" = 1 ]; then
BYTEORDER=1234
BIG_ENDIAN=0
echo little
@ -468,16 +465,16 @@ HAVE_LIB_DL="1"
DL_LIBS="-ldl"
else
if [ "$HOST_OS" = "gnu/kfreebsd" ]; then
USEROSTYPE="bsd"
USEROSTYPE="gnulinux"
else
if [ "$HOST_OS" = "netbsd" ]; then
USEROSTYPE="bsd"
USEROSTYPE="gnulinux"
else
if [ "$HOST_OS" = "freebsd" ]; then
USEROSTYPE="bsd"
USEROSTYPE="gnulinux"
else
if [ "$HOST_OS" = "openbsd" ]; then
USEROSTYPE="bsd"
USEROSTYPE="gnulinux"
else
if [ "$HOST_OS" = "darwin" ]; then
USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi

View File

@ -4,7 +4,6 @@ CONTACT pancake ; pancake@nopcode.org
LANG_C!
ARG_ENABLE CPARSE cparse build with cparse support ;
ARG_DISABLE DEBUGGER debugger disable native debugger features ;
(( -ldl -dynamic ... ))

View File

@ -3,7 +3,6 @@ include ../config.mk
NAME=r_anal
DEPS=r_util r_db r_reg r_syscall
# r_core (commented as it would be recursive)
CFLAGS*=HAVE_CPARSE=$(HAVE_CPARSE)
CFLAGS+=-DCORELIB -Iarch -I$(TOP)/shlr
LDFLAGS+=${BN_LIBS}
@ -31,7 +30,7 @@ OBJLIBS+=anal_ex.o switch.o state.o cycles.o
OBJLIBS+=esil_stats.o esil_trace.o flirt.o labels.o
OBJLIBS+=esil2reil.o pin.o
OBJS=${STATIC_OBJS} ${OBJLIBS} ${CPARSE_OBJS}
OBJS=${STATIC_OBJS} ${OBJLIBS}
test tests: tests-esil

View File

@ -171,56 +171,3 @@ R_API char *r_anal_type_format (RAnal *anal, const char *t) {
}
return NULL;
}
#if 0
//NOTES FROM THE OLD CPARSE IMPLEMENTATION
enum {
R_ANAL_TYPE_VARIABLE = 1,
R_ANAL_TYPE_POINTER = 2,
R_ANAL_TYPE_ARRAY = 3,
R_ANAL_TYPE_STRUCT = 4,
R_ANAL_TYPE_UNION = 5,
R_ANAL_TYPE_ALLOCA = 6,
R_ANAL_TYPE_FUNCTION = 7,
R_ANAL_TYPE_ANY = 8,
};
// [0:3] bits - place to store variable size
#define R_ANAL_VAR_TYPE_SIZE_MASK 0xF
enum {
R_ANAL_VAR_TYPE_CHAR = 1,
R_ANAL_VAR_TYPE_BYTE = 2,
R_ANAL_VAR_TYPE_WORD = 3,
R_ANAL_VAR_TYPE_DWORD = 4,
R_ANAL_VAR_TYPE_QWORD = 5,
R_ANAL_VAR_TYPE_SHORT = 6,
R_ANAL_VAR_TYPE_INT = 7,
R_ANAL_VAR_TYPE_LONG = 8,
R_ANAL_VAR_TYPE_LONGLONG = 9,
R_ANAL_VAR_TYPE_FLOAT = 10,
R_ANAL_VAR_TYPE_DOUBLE = 11,
R_ANAL_VAR_TYPE_VOID = 12,
};
// [4:7] bits - place to store sign of variable
#define R_ANAL_VAR_TYPE_SIGN_MASK 0xF0
#define R_ANAL_VAR_TYPE_SIGN_SHIFT 4
enum {
R_ANAL_VAR_TYPE_SIGNED = 1,
R_ANAL_VAR_TYPE_UNSIGNED = 2,
};
// [8:11] bits - place to store variable modifiers/parameters
#define R_ANAL_VAR_TYPE_MODIFIER_MASK 0xF00
#define R_ANAL_VAR_TYPE_MODIFIER_SHIFT 8
enum {
R_ANAL_VAR_TYPE_REGISTER = 1,
R_ANAL_VAR_TYPE_CONST = 2,
R_ANAL_VAR_TYPE_STATIC = 3,
R_ANAL_VAR_TYPE_VOLATILE = 4,
};
#endif

View File

@ -64,7 +64,6 @@ typedef struct r_anal_range_t {
ut64 from;
ut64 to;
} RAnalRange;
/* CPARSE stuff */
#define R_ANAL_UNMASK_TYPE(x) (x&R_ANAL_VAR_TYPE_SIZE_MASK)
#define R_ANAL_UNMASK_SIGN(x) (((x& R_ANAL_VAR_TYPE_SIGN_MASK)>> R_ANAL_VAR_TYPE_SIGN_SHIFT)==R_ANAL_VAR_TYPE_UNSIGNED)?0:1