Skip to content
Snippets Groups Projects
Commit e22d4182 authored by Anton Johansson's avatar Anton Johansson Committed by Anton
Browse files

Export `libtcg_dump_instruction_to_buffer`

parent 7efaa905
No related branches found
No related tags found
No related merge requests found
......@@ -316,9 +316,6 @@ typedef struct LibTinyCodeInstructionList {
* as well.
*/
void libtcg_dump_instruction_to_buffer(LibTinyCodeInstruction *insn, char *buf,
size_t size);
const char *libtcg_get_instruction_name(LibTinyCodeOpcode opcode);
LibTinyCodeCallInfo libtcg_get_call_info(LibTinyCodeInstruction *insn);
......@@ -357,11 +354,12 @@ typedef struct LibTinyCodeContext LibTinyCodeContext;
typedef ret LIBTCG_FUNC_TYPE(name) params /* Funciton typedef */
LIBTCG_EXPORT(LibTinyCodeContext *, libtcg_context_create, (LibTinyCodeDesc *desc));
LIBTCG_EXPORT(void, libtcg_context_destroy, (LibTinyCodeContext *context));
LIBTCG_EXPORT(LibTinyCodeInstructionList, libtcg_translate, (LibTinyCodeContext *context, const unsigned char *buffer, size_t size, uint64_t virtual_address));
LIBTCG_EXPORT(void, libtcg_instruction_list_destroy, (LibTinyCodeContext *context, LibTinyCodeInstructionList));
LIBTCG_EXPORT(uint8_t *, libtcg_env_ptr, (LibTinyCodeContext *context));
LIBTCG_EXPORT(LibTinyCodeContext *, libtcg_context_create, (LibTinyCodeDesc *desc));
LIBTCG_EXPORT(void, libtcg_context_destroy, (LibTinyCodeContext *context));
LIBTCG_EXPORT(LibTinyCodeInstructionList, libtcg_translate, (LibTinyCodeContext *context, const unsigned char *buffer, size_t size, uint64_t virtual_address));
LIBTCG_EXPORT(void, libtcg_instruction_list_destroy, (LibTinyCodeContext *context, LibTinyCodeInstructionList));
LIBTCG_EXPORT(uint8_t *, libtcg_env_ptr, (LibTinyCodeContext *context));
LIBTCG_EXPORT(void, libtcg_dump_instruction_to_buffer, (LibTinyCodeInstruction *insn, char *buf, size_t size));
/*
* struct to help load functions we expose,
......@@ -369,11 +367,12 @@ LIBTCG_EXPORT(uint8_t *, libtcg_env_ptr, (LibT
*/
typedef struct LibTcgInterface {
// Functions
LIBTCG_FUNC_TYPE(libtcg_context_create) *context_create;
LIBTCG_FUNC_TYPE(libtcg_context_destroy) *context_destroy;
LIBTCG_FUNC_TYPE(libtcg_translate) *translate;
LIBTCG_FUNC_TYPE(libtcg_instruction_list_destroy) *instruction_list_destroy;
LIBTCG_FUNC_TYPE(libtcg_env_ptr) *env_ptr;
LIBTCG_FUNC_TYPE(libtcg_context_create) *context_create;
LIBTCG_FUNC_TYPE(libtcg_context_destroy) *context_destroy;
LIBTCG_FUNC_TYPE(libtcg_translate) *translate;
LIBTCG_FUNC_TYPE(libtcg_instruction_list_destroy) *instruction_list_destroy;
LIBTCG_FUNC_TYPE(libtcg_env_ptr) *env_ptr;
LIBTCG_FUNC_TYPE(libtcg_dump_instruction_to_buffer) *dump_instruction_to_buffer;
// CPUState variables
intptr_t exception_index;
......
......@@ -433,11 +433,12 @@ uint8_t *libtcg_env_ptr(LibTinyCodeContext *context)
LibTcgInterface libtcg_load(void) {
return (LibTcgInterface) {
// Functions
.context_create = libtcg_context_create,
.context_destroy = libtcg_context_destroy,
.translate = libtcg_translate,
.instruction_list_destroy = libtcg_instruction_list_destroy,
.env_ptr = libtcg_env_ptr,
.context_create = libtcg_context_create,
.context_destroy = libtcg_context_destroy,
.translate = libtcg_translate,
.instruction_list_destroy = libtcg_instruction_list_destroy,
.env_ptr = libtcg_env_ptr,
.dump_instruction_to_buffer = libtcg_dump_instruction_to_buffer,
// CPUState variables
.exception_index = offsetof(ArchCPU, parent_obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment