mirror of https://github.com/stella-emu/stella.git
removed 'echo' and enhanced 'print' instead
This commit is contained in:
parent
3ca6f5a9d3
commit
e10ca8e694
|
@ -509,6 +509,8 @@ string DebuggerParser::eval()
|
|||
{
|
||||
ostringstream buf;
|
||||
for(uInt32 i = 0; i < argCount; ++i)
|
||||
{
|
||||
if(args[i] < 0x10000)
|
||||
{
|
||||
string rlabel = debugger.cartDebug().getLabel(args[i], true);
|
||||
string wlabel = debugger.cartDebug().getLabel(args[i], false);
|
||||
|
@ -525,13 +527,12 @@ string DebuggerParser::eval()
|
|||
buf << rlabel << "(R): ";
|
||||
else if(validW)
|
||||
buf << wlabel << "(W): ";
|
||||
}
|
||||
|
||||
if(args[i] < 0x100)
|
||||
buf << "$" << Base::toString(args[i], Base::F_16_2)
|
||||
<< " %" << Base::toString(args[i], Base::F_2_8);
|
||||
else
|
||||
buf << "$" << Base::toString(args[i], Base::F_16_4)
|
||||
<< " %" << Base::toString(args[i], Base::F_2_16);
|
||||
buf << "$" << Base::toString(args[i], Base::F_16);
|
||||
|
||||
if(args[i] < 0x10000)
|
||||
buf << " %" << Base::toString(args[i], Base::F_2);
|
||||
|
||||
buf << " #" << int(args[i]);
|
||||
if(i != argCount - 1)
|
||||
|
@ -933,20 +934,6 @@ void DebuggerParser::executeDump()
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// "echo"
|
||||
void DebuggerParser::executeEcho()
|
||||
{
|
||||
int res = YaccParser::parse(argStrings[0].c_str());
|
||||
if(res == 0)
|
||||
{
|
||||
unique_ptr<Expression> expr(YaccParser::getResult());
|
||||
commandResult << expr->evaluate();
|
||||
}
|
||||
else
|
||||
commandResult << red("invalid expression");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// "exec"
|
||||
void DebuggerParser::executeExec()
|
||||
|
@ -1937,16 +1924,6 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
|||
std::mem_fn(&DebuggerParser::executeDump)
|
||||
},
|
||||
|
||||
{
|
||||
"echo",
|
||||
"Echo expression result",
|
||||
"Example: echo _fycles, echo _scan*#76, echo _bank==1",
|
||||
false,
|
||||
true,
|
||||
{ kARG_DWORD, kARG_END_ARGS },
|
||||
std::mem_fn(&DebuggerParser::executeEcho)
|
||||
},
|
||||
|
||||
{
|
||||
"exec",
|
||||
"Execute script file <xx>",
|
||||
|
@ -2125,7 +2102,7 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
|
|||
"Example: print pc, print f000",
|
||||
true,
|
||||
false,
|
||||
{ kARG_WORD, kARG_END_ARGS },
|
||||
{ kARG_DWORD, kARG_END_ARGS },
|
||||
std::mem_fn(&DebuggerParser::executePrint)
|
||||
},
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class DebuggerParser
|
|||
bool saveScriptFile(string file);
|
||||
|
||||
private:
|
||||
enum { kNumCommands = 73 };
|
||||
enum { kNumCommands = 72 };
|
||||
|
||||
// Constants for argument processing
|
||||
enum {
|
||||
|
@ -144,7 +144,6 @@ class DebuggerParser
|
|||
void executeDelwatch();
|
||||
void executeDisasm();
|
||||
void executeDump();
|
||||
void executeEcho();
|
||||
void executeExec();
|
||||
void executeExitRom();
|
||||
void executeFrame();
|
||||
|
|
Loading…
Reference in New Issue