Author: arty
Date: Fri Oct 19 11:22:01 2007
New Revision: 29672
URL:
http://svn.reactos.org/svn/reactos?rev=29672&view=rev
Log:
Debug DbgBreakPoint and drop to GDB on program trap.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
trunk/reactos/lib/ppcmmu/gdblib.c
trunk/reactos/lib/ppcmmu/mmuobject.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Fri Oct 19 11:22:01 2007
@@ -514,7 +514,7 @@
}
extern int _bss;
-typedef unsigned int uint32_t;
+//typedef unsigned int uint32_t;
void PpcDefaultMachVtbl()
{
@@ -661,5 +661,5 @@
}
void DbgBreakPoint() {
- ofw_exit();
-}
+ __asm__("twi 31,0,0");
+}
Modified: trunk/reactos/lib/ppcmmu/gdblib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/ppcmmu/gdblib.c?rev=29…
==============================================================================
--- trunk/reactos/lib/ppcmmu/gdblib.c (original)
+++ trunk/reactos/lib/ppcmmu/gdblib.c Fri Oct 19 11:22:01 2007
@@ -249,42 +249,24 @@
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;
-
- case '-':
- count = 0;
- break;
-
- case '+':
- PacketSent = 1;
- break;
- }
- } while(PacketSent != 1);
-}
+ SerialWrite('$');
+ for (i = 0; i < DataOutAddr; i++)
+ {
+ SerialWrite(DataOutBuffer[i]);
+ }
+ SerialWrite('#');
+ SerialWrite(hex[(DataOutCsum >> 4) & 15]);
+ SerialWrite(hex[DataOutCsum & 15]);
+
+ while(!chr(serport) && ((ch = SerialRead()) != '+') && (ch !=
'$'));
+ if (ch == '$')
+ {
+ ParseState = 0;
+ DataInAddr = 0;
+ ComputedCsum = 0;
+ }
+}
+
void PacketWriteString(char *str)
{
@@ -481,8 +463,7 @@
{
Signal = n;
RegisterSaveArea = tf;
- if (SendSignal)
- PacketWriteSignal(Signal);
+ PacketWriteSignal(Signal);
SendSignal = 0;
Continue = 0;
while(!Continue) SerialInterrupt(n, tf);
Modified: trunk/reactos/lib/ppcmmu/mmuobject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/ppcmmu/mmuobject.c?rev…
==============================================================================
--- trunk/reactos/lib/ppcmmu/mmuobject.c (original)
+++ trunk/reactos/lib/ppcmmu/mmuobject.c Fri Oct 19 11:22:01 2007
@@ -304,6 +304,9 @@
/* Serial Interrupt */
callback[5] = SerialInterrupt;
+ /* Program Exception */
+ callback[6] = TakeException;
+
/* Floating point exception */
callback[8] = fpenable;