patch-2.3.99-pre7 linux/arch/ppc/xmon/xmon.c
Next file: linux/arch/sh/defconfig
Previous file: linux/arch/ppc/xmon/start_8xx.c
Back to the patch index
Back to the overall index
- Lines: 105
- Date:
Wed May 3 01:47:57 2000
- Orig file:
v2.3.99-pre6/linux/arch/ppc/xmon/xmon.c
- Orig date:
Fri Mar 10 16:40:40 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/arch/ppc/xmon/xmon.c linux/arch/ppc/xmon/xmon.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 1996 Paul Mackerras.
*/
+#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <asm/ptrace.h>
@@ -120,8 +121,7 @@
xmon(struct pt_regs *excp)
{
struct pt_regs regs;
- int msr, cmd, i;
- unsigned *sp;
+ int msr, cmd;
if (excp == NULL) {
asm volatile ("stw 0,0(%0)\n\
@@ -137,29 +137,6 @@
excp = ®s;
}
- prom_drawstring("xmon pc="); prom_drawhex(excp->nip);
- prom_drawstring(" lr="); prom_drawhex(excp->link);
- prom_drawstring(" msr="); prom_drawhex(excp->msr);
- prom_drawstring(" trap="); prom_drawhex(excp->trap);
- prom_drawstring(" sp="); prom_drawhex(excp->gpr[1]);
- sp = (unsigned *)&excp->gpr[0];
- for (i = 0; i < 32; ++i) {
- if ((i & 7) == 0)
- prom_drawstring("\n");
- prom_drawstring(" ");
- prom_drawhex(sp[i]);
- }
- sp = (unsigned *) excp->gpr[1];
- for (i = 0; i < 64; ++i) {
- if ((i & 7) == 0) {
- prom_drawstring("\n");
- prom_drawhex(sp);
- prom_drawstring(" ");
- }
- prom_drawstring(" ");
- prom_drawhex(sp[i]);
- }
- prom_drawstring("\n");
msr = get_msr();
set_msr(msr & ~0x8000); /* disable interrupts */
remove_bpts();
@@ -284,10 +261,12 @@
bp->enabled = 0;
}
}
+#ifndef CONFIG_8xx
if (dabr.enabled)
set_dabr(dabr.address);
if (iabr.enabled)
set_iabr(iabr.address);
+#endif
}
static void
@@ -297,8 +276,10 @@
struct bpt *bp;
unsigned instr;
+#ifndef CONFIG_8xx
set_dabr(0);
set_iabr(0);
+#endif
bp = bpts;
for (i = 0; i < NBPTS; ++i, ++bp) {
if (!bp->enabled)
@@ -412,6 +393,7 @@
cmd = inchar();
switch (cmd) {
+#ifndef CONFIG_8xx
case 'd':
mode = 7;
cmd = inchar();
@@ -436,6 +418,7 @@
iabr.address |= 3;
scanhex(&iabr.count);
break;
+#endif
case 'c':
if (!scanhex(&a)) {
/* clear all breakpoints */
@@ -1406,6 +1389,7 @@
return NULL;
#if 0
cmp = simple_strtoul(c, &c, 8);
+ /* XXX crap, we don't want the whole of the rest of the map - paulus */
strcpy( last, strsep( &c, "\n"));
while ( c < (sysmap+sysmap_size) )
{
@@ -1414,7 +1398,7 @@
break;
strcpy( last, strsep( &c, "\n"));
}
- return NULLlast;
+ return last;
#endif
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)