//!compile = {cc} {ccflags} -c -o {ofile} {infile} && {cc} {ccflags} -o {outfile} {ofile} {driver} ../libdbrew.a -I../include

#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>

#include "dbrew.h"

int f1(int);
// possible jump target
int f2(int x) { return x; }

int main()
{
    // Decode the function.
    Rewriter* r = dbrew_new();
    // to get rid of changing addresses, assume gen code to be 200 bytes max
    dbrew_config_function_setname(r, (uintptr_t) f1, "f1");
    dbrew_config_function_setsize(r, (uintptr_t) f1, 200);
    dbrew_decode_print(r, (uintptr_t) f1, 1);

    return 0;
}

//!compile = as -c -o {ofile} {infile} && {cc} {ccflags} -o {outfile} {ofile} {driver} ../libdbrew.a -I../include

#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>

#include "dbrew.h"

int f1(int);
// possible jump target
int f2(int x) { return x; }

int main()
{
    // Decode the function.
    Rewriter* r = dbrew_new();
    // to get rid of changing addresses, assume gen code to be 200 bytes max
    dbrew_config_function_setname(r, (uintptr_t) f1, "f1");
    dbrew_config_function_setsize(r, (uintptr_t) f1, 200);
    dbrew_decode_print(r, (uintptr_t) f1, 1);

    return 0;
}

Fix Travis for decoder tests
Fix Travis for decoder tests

The assembler of clang-3.5 in the images used by Travis seems to have
a bug with assembling the "test" instruction, resulting in machine
code with reversed operands (this does not happen e.g. with clang-3.8).
As decoder tests all use assembly files as input, we force use of the
GNU assembler "as" via setting the compile line accordingly for this
test class.
