diff options
author | 2015-09-13 08:41:44 +0200 | |
---|---|---|
committer | 2015-09-13 08:41:44 +0200 | |
commit | f88cefad27a1737c76e09d99c9fb43e173506081 (patch) | |
tree | 2d8167d03579c46e226471747eb4407bd00ed6fa /src/devices/cpu/x86log.h | |
parent | e92ac9e0fa8e99869894bea00589bbb526be30aa (diff) |
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/devices/cpu/x86log.h')
-rw-r--r-- | src/devices/cpu/x86log.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/devices/cpu/x86log.h b/src/devices/cpu/x86log.h new file mode 100644 index 00000000000..68ca2ec5257 --- /dev/null +++ b/src/devices/cpu/x86log.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles +/*************************************************************************** + + x86log.h + + x86/x64 code logging helpers. + +***************************************************************************/ + +#pragma once + +#ifndef __X86LOG_H__ +#define __X86LOG_H__ + +#include "x86emit.h" + + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +struct x86log_context; + + + +/*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ + +/* create a new context */ +x86log_context *x86log_create_context(const char *filename); + +/* release a context */ +void x86log_free_context(x86log_context *log); + +/* add a comment associated with a given code pointer */ +void x86log_add_comment(x86log_context *log, x86code *base, const char *format, ...) ATTR_PRINTF(3,4); + +/* mark a given range as data for logging purposes */ +void x86log_mark_as_data(x86log_context *log, x86code *base, x86code *end, int size); + +/* disassemble a range of code and reset accumulated information */ +void x86log_disasm_code_range(x86log_context *log, const char *label, x86code *start, x86code *stop); + +/* manually printf information to the log file */ +void x86log_printf(x86log_context *log, const char *format, ...) ATTR_PRINTF(2,3); + + +#endif /* __X86LOG_H__ */ |