diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-04-24 20:49:31 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-04-24 20:49:31 -0700 |
commit | 3f8fd3720d38bded32fdf88ed3824f9c8745a4a7 (patch) | |
tree | a89fd02a712b39a83eee336471a3752f5bb5797f /m68k_core.h | |
parent | 8d362430c6785dcc4b9ed3a7a97acba8ebb15950 (diff) |
Fix interaction between 68K debugger and instruction retranslation due to self modifying code or bank switching
Diffstat (limited to 'm68k_core.h')
-rw-r--r-- | m68k_core.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/m68k_core.h b/m68k_core.h index 48a2a90..7773d64 100644 --- a/m68k_core.h +++ b/m68k_core.h @@ -56,13 +56,23 @@ typedef struct { code_ptr get_sr; code_ptr set_sr; code_ptr set_ccr; + code_ptr bp_stub; code_info extra_code; movem_fun *big_movem; uint32_t num_movem; uint32_t movem_storage; + code_word prologue_start; } m68k_options; -typedef struct m68k_context { +typedef struct m68k_context m68k_context; +typedef void (*m68k_debug_handler)(m68k_context *context, uint32_t pc); + +typedef struct { + m68k_debug_handler handler; + uint32_t address; +} m68k_breakpoint; + +struct m68k_context { uint8_t flags[5]; uint8_t status; uint16_t int_ack; @@ -79,14 +89,17 @@ typedef struct m68k_context { code_ptr reset_handler; m68k_options *options; void *system; + m68k_breakpoint *breakpoints; + uint32_t num_breakpoints; + uint32_t bp_storage; uint8_t int_pending; uint8_t trace_pending; uint8_t should_return; uint8_t ram_code_flags[]; -} m68k_context; +}; typedef m68k_context *(*m68k_reset_handler)(m68k_context *context); -typedef m68k_context *(*m68k_debug_handler)(m68k_context *context, uint32_t pc); + void translate_m68k_stream(uint32_t address, m68k_context * context); void start_68k_context(m68k_context * context, uint32_t address); |