Commit 68799419 authored by Julian Kranz's avatar Julian Kranz

Jgdrr

- Continued to implement jgdrr
parent b2a44c6c
......@@ -25,3 +25,9 @@ gdrr/.project
gdrr/Debug/
include/
specifications/x86/c/cli-gdrr
jgdrr/.classpath
jgdrr/bin/NativeInterface.class
jgdrr/bin/Program.class
jgdrr/bin/RReilStatement.class
jgdrr/bin/libjgdrr.so
......@@ -3,5 +3,5 @@
./gdsl @MLton fixed-heap 6g -- "specifications/rreil/rreil.ml" "specifications/x86/x86.ml" "specifications/x86/x86-rreil-registermapping.ml" "specifications/x86/x86-pretty.ml" "specifications/rreil/rreil-pretty.ml" "specifications/x86/x86-rreil-translator.ml" "specifications/x86/x86-rreil-translator-a-l.ml" "specifications/x86/x86-rreil-translator-m-z.ml"
#[ $? -eq 0 ] && clang -fno-inline -O -c dis.c -o dis.o
[ $? -eq 0 ] && clang -c dis.c -o dis.o
[ $? -eq 0 ] && clang -fPIC -c dis.c -o dis.o
#[ $? -eq 0 ] && clang -fno-inline -O -S dis.c
This diff is collapsed.
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class NativeInterface */
#ifndef _Included_NativeInterface
#define _Included_NativeInterface
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: NativeInterface
* Method: decodeAndTranslateNative
* Signature: ([B)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_NativeInterface_decodeAndTranslateNative
(JNIEnv *, jobject, jbyteArray);
#ifdef __cplusplus
}
#endif
#endif
public class NativeInterface {
public NativeInterface() {
System.loadLibrary("jgdrr");
}
public RReilStatement[] decodeAndTranslate(byte[] bytes) {
return (RReilStatement[])decodeAndTranslateNative(bytes);
}
private Object assign(Object p) {
System.out.println("assign - but in Java :-)");
return null;
}
private native Object decodeAndTranslateNative(byte[] bytes);
}
public class Program {
/**
* @param args
*/
public static void main(String[] args) {
NativeInterface n = new NativeInterface();
n.decodeAndTranslate(null);
}
}
public abstract class RReilStatement {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment