mirror of
https://github.com/RyuKojiro/apple1.git
synced 2024-09-27 04:54:54 +00:00
Added symbol table support for debugger
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@60 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
723cfa3362
commit
882da238f4
@ -29,6 +29,7 @@
|
|||||||
static v6502_cpu *cpu;
|
static v6502_cpu *cpu;
|
||||||
static a1pia *pia;
|
static a1pia *pia;
|
||||||
static int consoleMessageSeen;
|
static int consoleMessageSeen;
|
||||||
|
static as6502_symbol_table *table;
|
||||||
|
|
||||||
static void fault(void *ctx, const char *e) {
|
static void fault(void *ctx, const char *e) {
|
||||||
(*(int *)ctx)++;
|
(*(int *)ctx)++;
|
||||||
@ -57,7 +58,7 @@ static void run(v6502_cpu *cpu) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!faulted && !pia->signalled) {
|
while (!faulted && !pia->signalled) {
|
||||||
dis6502_printAnnotatedInstruction(asmfile, cpu, cpu->pc);
|
dis6502_printAnnotatedInstruction(asmfile, cpu, cpu->pc, table);
|
||||||
v6502_step(cpu);
|
v6502_step(cpu);
|
||||||
v6502_printCpuState(asmfile, cpu);
|
v6502_printCpuState(asmfile, cpu);
|
||||||
}
|
}
|
||||||
@ -80,6 +81,7 @@ int main(int argc, const char * argv[])
|
|||||||
cpu->memory = v6502_createMemory(v6502_memoryStartCeiling + 1);
|
cpu->memory = v6502_createMemory(v6502_memoryStartCeiling + 1);
|
||||||
|
|
||||||
v6502_breakpoint_list *breakpoint_list = v6502_createBreakpointList();
|
v6502_breakpoint_list *breakpoint_list = v6502_createBreakpointList();
|
||||||
|
table = as6502_createSymbolTable();
|
||||||
|
|
||||||
// Load Woz Monitor
|
// Load Woz Monitor
|
||||||
printf("Loading ROM...\n");
|
printf("Loading ROM...\n");
|
||||||
@ -128,7 +130,7 @@ int main(int argc, const char * argv[])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v6502_handleDebuggerCommand(cpu, command, commandLen, breakpoint_list, run, &verbose)) {
|
if (v6502_handleDebuggerCommand(cpu, command, commandLen, breakpoint_list, table, run, &verbose)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (command[0] != ';') {
|
else if (command[0] != ';') {
|
||||||
@ -137,6 +139,7 @@ int main(int argc, const char * argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
as6502_destroySymbolTable(table);
|
||||||
v6502_destroyBreakpointList(breakpoint_list);
|
v6502_destroyBreakpointList(breakpoint_list);
|
||||||
history_end(hist);
|
history_end(hist);
|
||||||
el_end(el);
|
el_end(el);
|
||||||
|
Loading…
Reference in New Issue
Block a user