- register more exceptions

- PC+4 if current PC points to breakpoint



git-svn-id: http://moon:8086/svn/mips@90 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-16 22:25:57 +00:00
parent 1f75695e9f
commit d125261048
2 changed files with 21 additions and 5 deletions
+10 -3
View File
@@ -402,6 +402,11 @@ hexToInt(char **ptr, unsigned long *intValue)
return (numChars);
}
int isBreak(unsigned long instr)
{
return ((instr & 0xFC00003F) == 0x0000000D);
}
/*
* This function does all command procesing for interfacing to gdb. It
* returns 1 if you should skip the instruction at the trap address, 0
@@ -417,9 +422,11 @@ handle_exception (unsigned long *registers)
unsigned long length;
char *ptr;
unsigned long *sp;
// branch shadow
if (registers[CR] & 0x80000000)
unsigned long *pAddr = (unsigned long *)registers[PC];
// is break
if (isBreak(*pAddr))
{
registers[PC] += 4;
}