Skip site navigation (1)Skip section navigation (2)
Date:      10 Nov 1997 15:39:20 -0000
From:      Alan.Judge@indigo.ie
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/4997: DDB_UNATTENDED doesn't always work
Message-ID:  <19971110153920.370.qmail@relay-mgr.indigo.ie>
Resent-Message-ID: <199711101540.HAA06866@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4997
>Category:       kern
>Synopsis:       DDB_UNATTENDED doesn't always work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 10 07:40:00 PST 1997
>Last-Modified:
>Originator:     Alan Judge
>Organization:
Indigo, Dublin, Ireland
>Release:        FreeBSD 2.2.5-RELEASE i386
>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
  
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971110153920.370.qmail>