fix gdb stub causing the emulator to hang on undefined instructions (#2054)
* dont hang on undefined instruction * Add spaces --------- Co-authored-by: Kemal Afzal <RSDuck@users.noreply.github.com>
This commit is contained in:
parent
161bd9d3d2
commit
12be06beb6
|
@ -38,7 +38,7 @@ void A_UNK(ARM* cpu)
|
||||||
{
|
{
|
||||||
Log(LogLevel::Warn, "undefined ARM%d instruction %08X @ %08X\n", cpu->Num?7:9, cpu->CurInstr, cpu->R[15]-8);
|
Log(LogLevel::Warn, "undefined ARM%d instruction %08X @ %08X\n", cpu->Num?7:9, cpu->CurInstr, cpu->R[15]-8);
|
||||||
#ifdef GDBSTUB_ENABLED
|
#ifdef GDBSTUB_ENABLED
|
||||||
cpu->GdbStub.Enter(true, Gdb::TgtStatus::FaultInsn, cpu->R[15]-8);
|
cpu->GdbStub.Enter(cpu->GdbStub.IsConnected(), Gdb::TgtStatus::FaultInsn, cpu->R[15]-8);
|
||||||
#endif
|
#endif
|
||||||
//for (int i = 0; i < 16; i++) printf("R%d: %08X\n", i, cpu->R[i]);
|
//for (int i = 0; i < 16; i++) printf("R%d: %08X\n", i, cpu->R[i]);
|
||||||
//NDS::Halt();
|
//NDS::Halt();
|
||||||
|
@ -56,7 +56,7 @@ void T_UNK(ARM* cpu)
|
||||||
{
|
{
|
||||||
Log(LogLevel::Warn, "undefined THUMB%d instruction %04X @ %08X\n", cpu->Num?7:9, cpu->CurInstr, cpu->R[15]-4);
|
Log(LogLevel::Warn, "undefined THUMB%d instruction %04X @ %08X\n", cpu->Num?7:9, cpu->CurInstr, cpu->R[15]-4);
|
||||||
#ifdef GDBSTUB_ENABLED
|
#ifdef GDBSTUB_ENABLED
|
||||||
cpu->GdbStub.Enter(true, Gdb::TgtStatus::FaultInsn, cpu->R[15]-4);
|
cpu->GdbStub.Enter(cpu->GdbStub.IsConnected(), Gdb::TgtStatus::FaultInsn, cpu->R[15]-4);
|
||||||
#endif
|
#endif
|
||||||
//NDS::Halt();
|
//NDS::Halt();
|
||||||
u32 oldcpsr = cpu->CPSR;
|
u32 oldcpsr = cpu->CPSR;
|
||||||
|
|
|
@ -152,6 +152,7 @@ public:
|
||||||
int RespFmt(const char* fmt, ...);
|
int RespFmt(const char* fmt, ...);
|
||||||
|
|
||||||
int RespStr(const char* str);
|
int RespStr(const char* str);
|
||||||
|
inline bool IsConnected() { return ConnFd > 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Disconnect();
|
void Disconnect();
|
||||||
|
|
Loading…
Reference in New Issue