-[NEW] Next (step over) implemented
This commit is contained in:
17
z80debug.cpp
17
z80debug.cpp
@@ -82,8 +82,8 @@ namespace z80debug
|
||||
z80debug::refresh();
|
||||
}
|
||||
|
||||
void stop() { is_debugging = true; refresh(); }
|
||||
void cont() { is_debugging = false; refresh(); }
|
||||
void stop() { is_debugging = true; breakpoints[z80::getPC()] &= ~8; refresh(); }
|
||||
void cont() { is_debugging = false; refresh();}
|
||||
const bool debugging() { return is_debugging; }
|
||||
|
||||
void box(int x, int y, int w, int h, uint8_t color)
|
||||
@@ -158,7 +158,7 @@ namespace z80debug
|
||||
for (int i=0; i<4;++i) colors[i]=COLOR_YELLOW;
|
||||
printrect(0,8, 44,1, COLOR_BLUE);
|
||||
}
|
||||
if (breakpoints[pc]&1) printtxt(0,8,"*", colors[0]);
|
||||
if (breakpoints[pc]&9) printtxt(0,8,"*", colors[0]);
|
||||
printtxt(1,8,tohex(pc,4), colors[1]);
|
||||
printtxt(7,8, z80dis::getOpcode(pc), colors[2]);
|
||||
printtxt(19,8, z80dis::getAsm(pc), colors[3]);
|
||||
@@ -166,7 +166,7 @@ namespace z80debug
|
||||
uint16_t pos = pc;
|
||||
for (int i=9;i<18;++i) {
|
||||
pos += z80dis::getOpcodeSize(pos);
|
||||
if (breakpoints[pos]&1) printtxt(0,i,"*", COLOR_RED);
|
||||
if (breakpoints[pos]&9) printtxt(0,i,"*", COLOR_RED);
|
||||
printtxt(1,i,tohex(pos,4), COLOR_CYAN);
|
||||
printtxt(7,i, z80dis::getOpcode(pos), COLOR_GRAY);
|
||||
printtxt(19,i, z80dis::getAsm(pos), COLOR_WHITE);
|
||||
@@ -175,7 +175,7 @@ namespace z80debug
|
||||
pos = pc;
|
||||
for (int i=7;i>=0;--i) {
|
||||
pos = find_previous_opcode(pos);
|
||||
if (breakpoints[pos]&1) printtxt(0,i,"*", COLOR_RED);
|
||||
if (breakpoints[pos]&9) printtxt(0,i,"*", COLOR_RED);
|
||||
printtxt(1,i,tohex(pos,4), COLOR_CYAN);
|
||||
printtxt(7,i, z80dis::getOpcode(pos), COLOR_GRAY);
|
||||
printtxt(19,i, z80dis::getAsm(pos), COLOR_WHITE);
|
||||
@@ -247,7 +247,7 @@ namespace z80debug
|
||||
|
||||
int line=0;
|
||||
for (int i=0; i<65536; ++i) {
|
||||
if (breakpoints[i]) {
|
||||
if (breakpoints[i]&7) {
|
||||
printtxt(2,line, tohex(i,4), COLOR_WHITE);
|
||||
printtxt(7,line, breakpoints[i]&1?"x":"-", COLOR_GRAY);
|
||||
printtxt(8,line, breakpoints[i]&2?"r":"-", COLOR_GRAY);
|
||||
@@ -414,4 +414,9 @@ namespace z80debug
|
||||
return (breakpoints[address]&type);
|
||||
}
|
||||
|
||||
void next()
|
||||
{
|
||||
breakpoints[z80::getPC()+z80dis::getOpcodeSize(z80::getPC())] |= 8;
|
||||
cont();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user