Subject: port-mac/1553: spurious call to Debugger() in macrom.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Jones <cjones@rupert.oscs.montana.edu>
List: netbsd-bugs
Date: 09/30/1995 15:59:12
>Number:         1553
>Category:       port-mac
>Synopsis:       spurious call to Debugger() in macrom.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 30 18:05:01 1995
>Last-Modified:
>Originator:     Chris Jones
>Organization:
**********************cjones@rupert.oscs.montana.edu**********************
* Chris  | "Nobody likes brain alteration!"                              *
*  Jones |                           --Peri Brown, _Doctor Who_          *
**************************************************************************
>Release:        Today
>Environment:
	
System: NetBSD rupert.oscs.montana.edu 1.0A NetBSD 1.0A (GENERIC) #0: Thu Sep 7 18:51:09 MDT 1995 root@amiga2.oscs.montana.edu:/mnt/src/sys/arch/mac68k/compile/GENERIC mac68k


>Description:
macrom.c calls Debugger() without enclosing the function call in any
kind of an #ifdef KGDB (or whatever is actually appropriate).  This
causes an error to the tune of undefined symbol referenced from text
segment when trying to compile a kernel without GDB or KGDB or
DIAGNOSTIC or whatever else...

>How-To-Repeat:

>Fix:
This seems to work, but don't take my work for it; this is the first
kernel patch I've ever submitted:

*** macrom.c.orig	Sat Sep 30 15:49:08 1995
--- macrom.c.new	Sat Sep 30 15:48:37 1995
***************
*** 94,101 ****
  void
  mrg_lvl1dtpanic()		/* Lvl1DT stopper */
  {
! 	printf("Agh!  I was called from Lvl1DT!!!\n");
! 	Debugger();
  }
  
  void
--- 94,100 ----
  void
  mrg_lvl1dtpanic()		/* Lvl1DT stopper */
  {
! 	panic("Agh!  I was called from Lvl1DT!!!\n");
  }
  
  void
>Audit-Trail:
>Unformatted: