GdbServer: Breakpoint intergation

This commit is contained in:
Scott Mansell authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:56:01 +02:00
1 parent 9a89741ff2
commit 2babc1292c
8 files changed
+111 -45

No files matched your search

+14 -8
View File
@@ -3060,12 +3060,9 @@ void OpDispatchBuilder::ALUOp(OpcodeArgs) {
void OpDispatchBuilder::INTOp(OpcodeArgs) {
uint8_t Reason{};
uint8_t Literal{};
BlockSetRIP = true;
bool setRIP = false;
switch (Op->OP) {
case 0xCC:
Reason = 0;
break;
case 0xCD:
Reason = 1;
Literal = Op->Src1.TypeLiteral.Literal;
@@ -3078,15 +3075,24 @@ void OpDispatchBuilder::INTOp(OpcodeArgs) {
break;
case 0xF4: {
Reason = 4;
// We want to set RIP to the next instruction after HLT
auto NewRIP = _Constant(Op->PC + Op->InstSize);
_StoreContext(8, offsetof(FEXCore::Core::CPUState, rip), NewRIP);
setRIP = true;
break;
}
case 0x0B:
Reason = 5;
case 0xCC:
Reason = 6;
setRIP = true;
break;
break;
}
if (setRIP) {
BlockSetRIP = setRIP;
// We want to set RIP to the next instruction after HLT/INT3
auto NewRIP = _Constant(Op->PC + Op->InstSize);
_StoreContext(8, offsetof(FEXCore::Core::CPUState, rip), NewRIP);
}
if (Op->OP == 0xCE) { // Conditional to only break if Overflow == 1