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;
typedef unsigned int uint32_t;
//typedef unsigned int uint32_t;
void PpcDefaultMachVtbl()
{
@ -661,5 +661,5 @@ void ChainLoadBiosBootSectorCode() {
}
void DbgBreakPoint() {
ofw_exit();
__asm__("twi 31,0,0");
}

View file

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

View file

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