mirror of
https://github.com/dingusdev/dingusppc.git
synced 2026-04-19 10:20:36 +00:00
FPU Fixing + Preparing for more debugging
This commit is contained in:
+15
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user