Subject: port-sparc64/15881: (De)bugger in sys/arch/sparc64/dev/iommu.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
List: netbsd-bugs
Date: 03/12/2002 19:23:01
>Number: 15881
>Category: port-sparc64
>Synopsis: Debugger() not protected by #ifdef DDB
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-sparc64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 11 22:24:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Lloyd Parkes
>Release: NetBSD 1.5ZA
>Organization:
Must Have Coffee
>Environment:
System: NetBSD archangel.must-have-coffee.gen.nz 1.5ZB NetBSD 1.5ZB (GENERIC) #1: Sun Mar 10 20:58:03 NZDT 2002 lloyd@archangel.must-have-coffee.gen.nz:/usr/src/sys/arch/sparc64/compile/GENERIC sparc64
Architecture: sparc64
Machine: sparc64
>Description:
sys/arch/sparc64/dev/iommu.c v1.49 has several calls to Debugger()
that aren't protected by #ifdef DDB.
>How-To-Repeat:
Build a kernel with DIAGNOSTIC or DEBUG, but no DDB.
>Fix:
Index: iommu.c
===================================================================
RCS file: /vol/NetBSD/cvs-src/syssrc/sys/arch/sparc64/dev/iommu.c,v
retrieving revision 1.49
diff -u -r1.49 iommu.c
--- iommu.c 2002/03/06 17:12:51 1.49
+++ iommu.c 2002/03/12 06:19:48
@@ -591,7 +591,9 @@
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
#endif
@@ -714,7 +716,9 @@
{
printf("iommu_dvmamap_load_raw(): extent_alloc(%d, %x) failed!\n",
(int)sgsize, flags);
+#ifdef DDB
Debugger();
+#endif
}
#endif
if (dvmaddr == (bus_addr_t)-1)
@@ -847,7 +851,9 @@
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
}
@@ -912,7 +918,9 @@
printf("seg %d dvmaddr %lx out of range %x - %x\n",
seg, (long)map->dm_segs[seg].ds_addr,
is->is_dvmabase, is->is_dvmaend);
+#ifdef DDB
Debugger();
+#endif
}
}
}
>Release-Note:
>Audit-Trail:
>Unformatted: