From judgea@relay-mgr.indigo.ie  Mon Nov 10 07:39:26 1997
Received: from relay-mgr.indigo.ie (relay-mgr.indigo.ie [194.125.133.235])
          by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA06810
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 Nov 1997 07:39:23 -0800 (PST)
          (envelope-from judgea@relay-mgr.indigo.ie)
Received: (qmail 371 invoked by uid 12325); 10 Nov 1997 15:39:20 -0000
Message-Id: <19971110153920.370.qmail@relay-mgr.indigo.ie>
Date: 10 Nov 1997 15:39:20 -0000
From: Alan.Judge@indigo.ie
Reply-To: Alan.Judge@indigo.ie
To: FreeBSD-gnats-submit@freebsd.org
Subject: DDB_UNATTENDED doesn't always work
X-Send-Pr-Version: 3.2

>Number:         4997
>Category:       kern
>Synopsis:       DDB_UNATTENDED doesn't always work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 10 07:40:00 PST 1997
>Closed-Date:    Mon Mar 26 16:02:12 PST 2001
>Last-Modified:  Mon Mar 26 16:11:09 PST 2001
>Originator:     Alan Judge
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
Indigo, Dublin, Ireland
>Environment:

	Standard 2.2.5 setup with DDB and DDB_UNATTENDED

>Description:

	Some types of crash don't call panic and end up in the debugger
	anyway.

>How-To-Repeat:

	Generate a fatal trap error, such as a page fault in kernel
	mode.

>Fix:
	
	I think the following patch should work.  It's hard to test easily.


*** i386/i386/trap.c	1997/11/10 15:19:14	1.1
--- i386/i386/trap.c	1997/11/10 15:19:20
***************
*** 665,668 ****
--- 665,671 ----
  	struct trapframe *frame;
  {
+ #ifdef DDB
+ 	extern int debugger_on_panic;
+ #endif
  	int code, type, eva, ss, esp;
  	struct soft_segment_descriptor softseg;
***************
*** 736,740 ****
  #endif
  #ifdef DDB
! 	if (kdb_trap (type, 0, frame))
  		return;
  #endif
--- 739,743 ----
  #endif
  #ifdef DDB
! 	if (debugger_on_panic && kdb_trap (type, 0, frame))
  		return;
  #endif
*** kern/kern_shutdown.c	1997/11/10 15:15:09	1.1
--- kern/kern_shutdown.c	1997/11/10 15:15:25
***************
*** 77,83 ****
  #if defined(DDB)
  #ifdef DDB_UNATTENDED
! 	static int debugger_on_panic = 0;
  #else
! 	static int debugger_on_panic = 1;
  #endif
  
--- 77,83 ----
  #if defined(DDB)
  #ifdef DDB_UNATTENDED
! 	int debugger_on_panic = 0;
  #else
! 	int debugger_on_panic = 1;
  #endif
  
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Mar 26 16:02:12 PST 2001 
State-Changed-Why:  
Hi Alan :-) Looks like this was fixed by revision 1.44 of 
kern_shutdown.c and the corresponding commit to i386/trap.c. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=4997 
>Unformatted:
