I found a bug in GoUntil Function in example code of AGDI driver. Please refer to the followed steps: 1.Start Debug Session; 2.Set a break point at address 00h(Emulator current PC value) 3.Set another break point at other address 4.Set cursor at the line of second break point 5.Press "Run to cursor line" button
Then,you will find the PC value always is 00h,and the code can not run.
The cause is in the code of GoUntil function as follow:
while (!StopRun) {
if (IsBreak (nAdr) || cbreaks || wbreaks) {
StepU();// One Step, then ReadPC()
Invalidate(); // registers, d/i-caches
if (BrkWalk (curPC) == 0x01) break;
if (IsBreak (curPC)) continue;
}
.... ....
Please notice the BOLD text in the code.We should put ReadPC() after StepU(),But the code maybe lost a "curPC=ReadPC()" expression.