-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
671 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma once | ||
|
||
#include <unicorn/unicorn.h> | ||
|
||
#include "lua.hpp" | ||
|
||
[[noreturn]] int ul_crash_unsupported_operation(lua_State* L); | ||
|
||
#if UC_API_MAJOR >= 2 | ||
int ul_ctl_exits_disable(lua_State* L); | ||
int ul_ctl_exits_enable(lua_State* L); | ||
int ul_ctl_flush_tlb(lua_State* L); | ||
int ul_ctl_get_arch(lua_State* L); | ||
int ul_ctl_get_cpu_model(lua_State* L); | ||
int ul_ctl_get_exits(lua_State* L); | ||
int ul_ctl_get_exits_cnt(lua_State* L); | ||
int ul_ctl_get_mode(lua_State* L); | ||
int ul_ctl_get_page_size(lua_State* L); | ||
int ul_ctl_get_timeout(lua_State* L); | ||
int ul_ctl_remove_cache(lua_State* L); | ||
int ul_ctl_request_cache(lua_State* L); | ||
int ul_ctl_set_cpu_model(lua_State* L); | ||
int ul_ctl_set_exits(lua_State* L); | ||
int ul_ctl_set_page_size(lua_State* L); | ||
#else | ||
#define ul_ctl_exits_disable ul_crash_unsupported_operation | ||
#define ul_ctl_exits_enable ul_crash_unsupported_operation | ||
#define ul_ctl_flush_tlb ul_crash_unsupported_operation | ||
#define ul_ctl_get_arch ul_crash_unsupported_operation | ||
#define ul_ctl_get_cpu_model ul_crash_unsupported_operation | ||
#define ul_ctl_get_exits ul_crash_unsupported_operation | ||
#define ul_ctl_get_exits_cnt ul_crash_unsupported_operation | ||
#define ul_ctl_get_mode ul_crash_unsupported_operation | ||
#define ul_ctl_get_page_size ul_crash_unsupported_operation | ||
#define ul_ctl_get_timeout ul_crash_unsupported_operation | ||
#define ul_ctl_remove_cache ul_crash_unsupported_operation | ||
#define ul_ctl_request_cache ul_crash_unsupported_operation | ||
#define ul_ctl_set_cpu_model ul_crash_unsupported_operation | ||
#define ul_ctl_set_exits ul_crash_unsupported_operation | ||
#define ul_ctl_set_page_size ul_crash_unsupported_operation | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include <unicorn/unicorn.h> | ||
#if UC_API_MAJOR >= 2 | ||
|
||
#include "unicornlua/lua.hpp" | ||
|
||
/** | ||
* Create a Lua table representation of a transaction block and push it to the | ||
* Lua stack. | ||
* | ||
* @param L | ||
* @param block | ||
*/ | ||
void create_table_from_transaction_block(lua_State* L, const uc_tb* block); | ||
|
||
#endif // UC_API_MAJOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.