mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
a debugger init function
* in addition this change persists breakpoints/watchpoints across reboots
This commit is contained in:
parent
2369481924
commit
5d552b445c
@ -99,10 +99,13 @@ void set_halt_65c02();
|
|||||||
void clear_halt_65c02();
|
void clear_halt_65c02();
|
||||||
void clear_halt_opcode(uint8_t opcode);
|
void clear_halt_opcode(uint8_t opcode);
|
||||||
void show_opcode_breakpts();
|
void show_opcode_breakpts();
|
||||||
|
#ifdef INTERFACE_CLASSIC
|
||||||
|
void c_interface_debugging();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void c_debugger_init();
|
||||||
bool c_debugger_should_break();
|
bool c_debugger_should_break();
|
||||||
void c_debugger_begin_stepping(stepping_struct_t s);
|
void c_debugger_begin_stepping(stepping_struct_t s);
|
||||||
void c_interface_debugging();
|
|
||||||
|
|
||||||
extern const struct opcode_struct opcodes_6502[256];
|
extern const struct opcode_struct opcodes_6502[256];
|
||||||
extern const struct opcode_struct opcodes_65c02[256];
|
extern const struct opcode_struct opcodes_65c02[256];
|
||||||
|
@ -1211,6 +1211,19 @@ void display_help() {
|
|||||||
num_buffer_lines = i;
|
num_buffer_lines = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void c_debugger_init() {
|
||||||
|
/* reset the watchpoints and breakpoints */
|
||||||
|
for (unsigned int i=0; i<MAX_BRKPTS; i++)
|
||||||
|
{
|
||||||
|
breakpoints[i] = -1;
|
||||||
|
watchpoints[i] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (unsigned int i=0; i<0x100; i++)
|
||||||
|
{
|
||||||
|
op_breakpoints[(unsigned char)i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
do_debug_command ()
|
do_debug_command ()
|
||||||
|
23
src/misc.c
23
src/misc.c
@ -26,11 +26,6 @@ static unsigned char apple_iie_rom[32768]; /* //e */
|
|||||||
bool do_logging = true; // also controlled by NDEBUG
|
bool do_logging = true; // also controlled by NDEBUG
|
||||||
FILE *error_log = NULL;
|
FILE *error_log = NULL;
|
||||||
|
|
||||||
/* in debugger.c */
|
|
||||||
extern int breakpoints[];
|
|
||||||
extern int watchpoints[];
|
|
||||||
extern int op_breakpoints[256];
|
|
||||||
|
|
||||||
GLUE_FIXED_READ(read_ram_default,apple_ii_64k)
|
GLUE_FIXED_READ(read_ram_default,apple_ii_64k)
|
||||||
GLUE_FIXED_WRITE(write_ram_default,apple_ii_64k)
|
GLUE_FIXED_WRITE(write_ram_default,apple_ii_64k)
|
||||||
GLUE_BANK_READ(read_ram_bank,base_d000_rd)
|
GLUE_BANK_READ(read_ram_bank,base_d000_rd)
|
||||||
@ -700,20 +695,6 @@ void reinitialize(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef DEBUGGER
|
|
||||||
/* reset the watchpoints and breakpoints */
|
|
||||||
for (i=0; i<MAX_BRKPTS; i++)
|
|
||||||
{
|
|
||||||
breakpoints[i] = -1;
|
|
||||||
watchpoints[i] = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<0x100; i++)
|
|
||||||
{
|
|
||||||
op_breakpoints[(unsigned char)i] = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
c_initialize_vm();
|
c_initialize_vm();
|
||||||
|
|
||||||
softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC;
|
softswitches = SS_TEXT | SS_IOUDIS | SS_C3ROM | SS_LCWRT | SS_LCSEC;
|
||||||
@ -759,6 +740,10 @@ void c_initialize_firsttime()
|
|||||||
MB_Initialize();
|
MB_Initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUGGER
|
||||||
|
c_debugger_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
reinitialize();
|
reinitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user