mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 23:25:09 +00:00
Debug DbgBreakPoint and drop to GDB on program trap.
svn path=/trunk/; revision=29672
This commit is contained in:
parent
d8772de615
commit
293cc2c20b
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,43 +249,25 @@ void PacketFinish()
|
||||||
|
|
||||||
PacketSent = 0;
|
PacketSent = 0;
|
||||||
|
|
||||||
do {
|
SerialWrite('$');
|
||||||
if (!count)
|
for (i = 0; i < DataOutAddr; i++)
|
||||||
{
|
{
|
||||||
SerialWrite('$');
|
SerialWrite(DataOutBuffer[i]);
|
||||||
for (i = 0; i < DataOutAddr; i++)
|
}
|
||||||
{
|
SerialWrite('#');
|
||||||
SerialWrite(DataOutBuffer[i]);
|
SerialWrite(hex[(DataOutCsum >> 4) & 15]);
|
||||||
}
|
SerialWrite(hex[DataOutCsum & 15]);
|
||||||
SerialWrite('#');
|
|
||||||
SerialWrite(hex[(DataOutCsum >> 4) & 15]);
|
|
||||||
SerialWrite(hex[DataOutCsum & 15]);
|
|
||||||
}
|
|
||||||
while(count-- != 0)
|
|
||||||
{
|
|
||||||
if (chr(serport))
|
|
||||||
{
|
|
||||||
ch = SerialRead();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (ch)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '-':
|
while(!chr(serport) && ((ch = SerialRead()) != '+') && (ch != '$'));
|
||||||
count = 0;
|
if (ch == '$')
|
||||||
break;
|
{
|
||||||
|
ParseState = 0;
|
||||||
case '+':
|
DataInAddr = 0;
|
||||||
PacketSent = 1;
|
ComputedCsum = 0;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
} while(PacketSent != 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PacketWriteString(char *str)
|
void PacketWriteString(char *str)
|
||||||
{
|
{
|
||||||
while(*str) PacketWriteChar(*str++);
|
while(*str) PacketWriteChar(*str++);
|
||||||
|
@ -481,8 +463,7 @@ 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;
|
||||||
while(!Continue) SerialInterrupt(n, tf);
|
while(!Continue) SerialInterrupt(n, tf);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue