diff options
Diffstat (limited to 'src/emu/cpu/x86log.h')
-rw-r--r-- | src/emu/cpu/x86log.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/emu/cpu/x86log.h b/src/emu/cpu/x86log.h new file mode 100644 index 00000000000..fe3e6490303 --- /dev/null +++ b/src/emu/cpu/x86log.h @@ -0,0 +1,53 @@ +/*************************************************************************** + + x86log.h + + x86/x64 code logging helpers. + + Copyright (c) 2007, Aaron Giles + Released for general use under the MAME license + Visit http://mamedev.org for licensing and usage restrictions. + +***************************************************************************/ + +#pragma once + +#ifndef __X86LOG_H__ +#define __X86LOG_H__ + +#include "cpuintrf.h" +#include "x86emit.h" + + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +typedef struct _x86log_context 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, ...); + +/* 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, ...); + + +#endif /* __X86LOG_H__ */ |