S2EExecutor: function to enable instruction printing from gdb

Useful for debugging, setting the llvm option from GDB does not
seem to work.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Expose internal KLEE headers to S2E

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Reworked device state snapshotting

Features:
 - Use KLEE address space to store disk state
 - Centralize all snapshotting in one place in S2EExecutor

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
build: Remove stray command from clean target

Signed-off-by: Diego Biurrun <diego@biurrun.de>
gitignore: Add some generated files in the guest subdirectory

Signed-off-by: Diego Biurrun <diego@biurrun.de>
guest: Build Linux tools non-recursively

This is more correct and simplifies the Makefile structure.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
s2e.h: Refactor repetitive inline assembly statements for S2E opcodes

Signed-off-by: Diego Biurrun <diego@biurrun.de>
misc typo fixes

Signed-off-by: Diego Biurrun <diego@biurrun.de>
docs: contribute: Adjust small grammar error.
docs: Fix errors in example plugin code
qemu: Set PKGVERSION to differentiate S2E qemu builds from vanilla qemu.

Originally fixed by Diego Biurrun

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
build: added missing EXTRA_QEMU_FLAGS to asan build

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
build: added EXTRA_QEMU_FLAGS explanation to the main Makefile

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Disabled parallel make in stp build process.

On my system, stp build fails with -j8:

/home/laurent/s2e/build/llvm-native/Release/bin/clang++ -O3 -DNDEBUG -fomit-frame-pointer   -fpic -D __STDC_LIMIT_MACROS -D
__STDC_FORMAT_MACROS -DEXT_HASH_MAP -Wno-deprecated  src/main/main.o lib/libstp.a -o bin/stp
lib/libstp.a(SimplifyingMinisat.o): In function `BEEV::SimplifyingMinisat::solve()':
SimplifyingMinisat.cpp:(.text+0x1a9): undefined reference to `Minisat::Solver::simplify()'

This is not reproducible with -j1. This patch removes parallel make for stp, just to be on the safe side.

Signed-off-by: Laurent Fasnacht <laurent.fasnacht@epfl.ch>
Fixed llvm_version_split in configure scripts to be compatible with python 3

Signed-off-by: Laurent Fasnacht <laurent.fasnacht@epfl.ch>
Python qemu scripts now work with Python 2.6 - 3.2.

Signed-off-by: Laurent Fasnacht <laurent.fasnacht@epfl.ch>
docs: ImageInstallation: fixed path for (native) qemu

Signed-off-by: Laurent Fasnacht <laurent.fasnacht@epfl.ch>
x86_64-s2e-softmmu.mak: create default s2e x86_64 config

Create the default-config file for x86_64-s2e-softmmu

Signed-off-by: Michael Contreras <michael@inetric.com>
target-i386:op_helper: Use _W macros for register writes

Update the register writes to use the _W macros when TARGET_X86_64 is defined.

Signed-off-by: Michael Contreras <michael@inetric.com>
target-i386:op_helper:tlb_fill: use addr with TARGET_PAGE_MASK

Instead of passing page_addr, pass addr & TARGET_PAGE_MASK to
cpu_x86_handle_mmu_fault(). When running in 64 bit mode, page_addr will have
the upper unused bits set to 0xf, which will cause problems. The reason for
passing the page address instead of the address is mentioned in the comments:

    In S2E we pass page address instead of addr to cpu_x86_handle_mmu_fault,
since the latter can be symbolic while the former is always concrete.  To
compensate, we reset fault address here.

Signed-off-by: Michael Contreras <michael@inetric.com>