FPU Fixing + Preparing for more debugging

This commit is contained in:
dingusdev
2020-01-11 18:43:47 -07:00
parent add0d5877c
commit c5ac0a2420
4 changed files with 55 additions and 12 deletions
+15 -1
View File
@@ -9,6 +9,7 @@
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include <map>
#include "ppcemu.h"
#include "../cpu/ppc/ppcmmu.h"
@@ -22,6 +23,7 @@ void show_help()
cout << " step -- execute single instruction" << endl;
cout << " until X -- execute until address X is reached" << endl;
cout << " regs -- dump content of the GRPs" << endl;
cout << " memdump -- dump content of the system memory to memdump.bin" << endl;
cout << " disas X,n -- disassemble N instructions starting at address X" << endl;
cout << " quit -- quit the debugger" << endl << endl;
cout << "Pressing ENTER will repeat last command." << endl;
@@ -40,6 +42,14 @@ void dump_regs()
cout << "MSR: " << hex << ppc_state.ppc_msr << endl;
}
void dump_mem_file()
{
std::ofstream memdumpfile;
memdumpfile.open("memdump.bin", std::ofstream::out | std::ofstream::binary);
memdumpfile.write((char *)&machine_sysram_mem, sizeof(char) * 67108864);
memdumpfile.close();
}
void enter_debugger()
{
string inp, cmd, addr_str, last_cmd;
@@ -69,7 +79,11 @@ void enter_debugger()
show_help();
} else if (cmd == "quit") {
break;
} else if (cmd == "regs") {
}
else if (cmd == "memdump") {
dump_mem_file();
}
else if (cmd == "regs") {
dump_regs();
} else if (cmd == "step") {
ppc_exec_single();