Debug DbgBreakPoint and drop to GDB on program trap.

svn path=/trunk/; revision=29672
This commit is contained in:
Art Yerkes 2007-10-19 07:22:01 +00:00
parent d8772de615
commit 293cc2c20b
3 changed files with 22 additions and 38 deletions

View file

@ -514,7 +514,7 @@ BOOLEAN PpcDiskNormalizeSystemPath(char *SystemPath, unsigned Size) {
} }
extern int _bss; extern int _bss;
typedef unsigned int uint32_t; //typedef unsigned int uint32_t;
void PpcDefaultMachVtbl() void PpcDefaultMachVtbl()
{ {
@ -661,5 +661,5 @@ void ChainLoadBiosBootSectorCode() {
} }
void DbgBreakPoint() { void DbgBreakPoint() {
ofw_exit(); __asm__("twi 31,0,0");
} }

View file

@ -249,9 +249,6 @@ void PacketFinish()
PacketSent = 0; PacketSent = 0;
do {
if (!count)
{
SerialWrite('$'); SerialWrite('$');
for (i = 0; i < DataOutAddr; i++) for (i = 0; i < DataOutAddr; i++)
{ {
@ -260,32 +257,17 @@ void PacketFinish()
SerialWrite('#'); SerialWrite('#');
SerialWrite(hex[(DataOutCsum >> 4) & 15]); SerialWrite(hex[(DataOutCsum >> 4) & 15]);
SerialWrite(hex[DataOutCsum & 15]); SerialWrite(hex[DataOutCsum & 15]);
}
while(count-- != 0)
{
if (chr(serport))
{
ch = SerialRead();
break;
}
}
switch (ch) while(!chr(serport) && ((ch = SerialRead()) != '+') && (ch != '$'));
if (ch == '$')
{ {
default: ParseState = 0;
break; DataInAddr = 0;
ComputedCsum = 0;
case '-':
count = 0;
break;
case '+':
PacketSent = 1;
break;
} }
} while(PacketSent != 1);
} }
void PacketWriteString(char *str) void PacketWriteString(char *str)
{ {
while(*str) PacketWriteChar(*str++); while(*str) PacketWriteChar(*str++);
@ -481,7 +463,6 @@ int TakeException(int n, ppc_trap_frame_t *tf)
{ {
Signal = n; Signal = n;
RegisterSaveArea = tf; RegisterSaveArea = tf;
if (SendSignal)
PacketWriteSignal(Signal); PacketWriteSignal(Signal);
SendSignal = 0; SendSignal = 0;
Continue = 0; Continue = 0;

View file

@ -304,6 +304,9 @@ void initme()
/* Serial Interrupt */ /* Serial Interrupt */
callback[5] = SerialInterrupt; callback[5] = SerialInterrupt;
/* Program Exception */
callback[6] = TakeException;
/* Floating point exception */ /* Floating point exception */
callback[8] = fpenable; callback[8] = fpenable;