1
0
Fork 0

DBG: fixed a bug with breakpoints

GUI: fixed a bug with the string instructions (thanks Nukem for reporting!)
This commit is contained in:
Mr. eXoDia 2014-06-21 00:36:16 +02:00
parent f9ab7c7723
commit 958ae10886
4 changed files with 19 additions and 2 deletions

View File

@ -72,6 +72,7 @@ void dbclose()
BookmarksInfo().swap(bookmarks);
FunctionsInfo().swap(functions);
LoopsInfo().swap(loops);
bpclear();
}
///module functions

View File

@ -236,4 +236,9 @@ void bpcacheload(JSON root)
breakpoints.insert(std::make_pair(BreakpointKey(curBreakpoint.type, key), curBreakpoint));
}
}
}
void bpclear()
{
BreakpointsInfo().swap(breakpoints);
}

View File

@ -44,5 +44,6 @@ int bpgetcount(BP_TYPE type);
void bptobridge(const BREAKPOINT* bp, BRIDGEBP* bridge);
void bpcachesave(JSON root);
void bpcacheload(JSON root);
void bpclear();
#endif // _BREAKPOINT_H

View File

@ -126,8 +126,18 @@ void BeaTokenizer::Mnemonic(BeaInstructionToken* instr, const DISASM* disasm)
type=TokenMnemonicNop;
else if(completeInstr.contains("movs") || completeInstr.contains("cmps") || completeInstr.contains("scas") || completeInstr.contains("lods") || completeInstr.contains("stos") || completeInstr.contains("outs"))
{
mnemonic.truncate(4);
StringInstruction(mnemonic, instr, disasm);
if(mnemonic.length()<5)
{
AddToken(instr, type, mnemonic, 0);
return;
}
if(mnemonic[4]=='b' || mnemonic[4]=='w' || mnemonic[4]=='d' || mnemonic[4]=='q')
{
mnemonic.truncate(4);
StringInstruction(mnemonic, instr, disasm);
}
else
AddToken(instr, type, mnemonic, 0);
return;
}
AddToken(instr, type, mnemonic, 0);