rename error codes ERR_MEM_READ, ERR_MEM_WRITE, ERR_MEM_FETCH
This commit is contained in:
@@ -39,9 +39,9 @@ const (
|
||||
ERR_HANDLE = 3
|
||||
ERR_MODE = 4
|
||||
ERR_VERSION = 5
|
||||
ERR_MEM_READ = 6
|
||||
ERR_MEM_WRITE = 7
|
||||
ERR_MEM_FETCH = 8
|
||||
ERR_READ_INVALID = 6
|
||||
ERR_WRITE_INVALID = 7
|
||||
ERR_FETCH_INVALID = 8
|
||||
ERR_CODE_INVALID = 9
|
||||
ERR_HOOK = 10
|
||||
ERR_INSN_INVALID = 11
|
||||
|
||||
@@ -49,8 +49,8 @@ func TestX86InvalidRead(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = mu.Start(ADDRESS, ADDRESS+uint64(len(code)))
|
||||
if err.(UcError) != ERR_MEM_READ {
|
||||
t.Fatal("Expected ERR_MEM_READ")
|
||||
if err.(UcError) != ERR_READ_INVALID {
|
||||
t.Fatal("Expected ERR_READ_INVALID")
|
||||
}
|
||||
ecx, _ := mu.RegRead(X86_REG_ECX)
|
||||
edx, _ := mu.RegRead(X86_REG_EDX)
|
||||
@@ -66,8 +66,8 @@ func TestX86InvalidWrite(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = mu.Start(ADDRESS, ADDRESS+uint64(len(code)))
|
||||
if err.(UcError) != ERR_MEM_WRITE {
|
||||
t.Fatal("Expected ERR_MEM_WRITE")
|
||||
if err.(UcError) != ERR_WRITE_INVALID {
|
||||
t.Fatal("Expected ERR_WRITE_INVALID")
|
||||
}
|
||||
ecx, _ := mu.RegRead(X86_REG_ECX)
|
||||
edx, _ := mu.RegRead(X86_REG_EDX)
|
||||
|
||||
@@ -41,9 +41,9 @@ public interface UnicornConst {
|
||||
public static final int UC_ERR_HANDLE = 3;
|
||||
public static final int UC_ERR_MODE = 4;
|
||||
public static final int UC_ERR_VERSION = 5;
|
||||
public static final int UC_ERR_MEM_READ = 6;
|
||||
public static final int UC_ERR_MEM_WRITE = 7;
|
||||
public static final int UC_ERR_MEM_FETCH = 8;
|
||||
public static final int UC_ERR_READ_INVALID = 6;
|
||||
public static final int UC_ERR_WRITE_INVALID = 7;
|
||||
public static final int UC_ERR_FETCH_INVALID = 8;
|
||||
public static final int UC_ERR_CODE_INVALID = 9;
|
||||
public static final int UC_ERR_HOOK = 10;
|
||||
public static final int UC_ERR_INSN_INVALID = 11;
|
||||
|
||||
@@ -37,9 +37,9 @@ UC_ERR_ARCH = 2
|
||||
UC_ERR_HANDLE = 3
|
||||
UC_ERR_MODE = 4
|
||||
UC_ERR_VERSION = 5
|
||||
UC_ERR_MEM_READ = 6
|
||||
UC_ERR_MEM_WRITE = 7
|
||||
UC_ERR_MEM_FETCH = 8
|
||||
UC_ERR_READ_INVALID = 6
|
||||
UC_ERR_WRITE_INVALID = 7
|
||||
UC_ERR_FETCH_INVALID = 8
|
||||
UC_ERR_CODE_INVALID = 9
|
||||
UC_ERR_HOOK = 10
|
||||
UC_ERR_INSN_INVALID = 11
|
||||
|
||||
Reference in New Issue
Block a user