16 messages in com.xensource.lists.xen-devel[Xen-devel] pdb entered even when set...
FromSent OnAttachments
Digital Infra, Inc.19 Mar 2004 04:29 
Digital Infra, Inc.19 Mar 2004 04:40 
Jacob Gorm Hansen19 Mar 2004 07:01 
Digital Infra, Inc.19 Mar 2004 07:27 
Dan Aloni09 Apr 2004 12:09 
Steven Hand10 Apr 2004 05:49 
Jacob Gorm Hansen13 Apr 2004 03:29 
Digital Infra, Inc.15 Apr 2004 07:17 
Digital Infra, Inc.27 Apr 2004 10:04 
Digital Infra, Inc.27 Apr 2004 10:07 
Jacob Gorm Hansen27 Apr 2004 10:24 
Digital Infra, Inc.27 Apr 2004 10:34 
Digital Infra, Inc.27 Apr 2004 10:35 
Brian Wolfe28 Apr 2004 10:59 
Ian Pratt28 Apr 2004 11:13 
Kip Macy07 Jun 2004 17:11 
Subject:[Xen-devel] pdb entered even when set to none
From:Kip Macy (kma@eventdriven.org)
Date:06/07/2004 05:11:35 PM
List:com.xensource.lists.xen-devel

In traps.c pdb_handle_exception is called on an int3:

asmlinkage void do_int3(struct pt_regs *regs, long error_code) { struct task_struct *p = current; struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id(); trap_info_t *ti;

if ( pdb_handle_exception(3, regs) == 0 ) return; <...>

It in turn goes through some elaborate checks that don't evaluate to true when FreeBSD panics:

<...> if ( exceptionVector == 3 && (xen_regs->xcs & 3) == 3 && xen_regs->eip != pdb_system_call_next_addr + 1) { TRC(printf("pdb: user bkpt (0x%x) at 0x%x:0x%lx:0x%lx\n", exceptionVector, xen_regs->xcs & 3, cr3, xen_regs->eip)); return 1; }

/* * If PDB didn't set the breakpoint, is not single stepping, * is not entering a system call in a domain, * the user didn't press the magic debug key, * then we don't handle the exception. */ bkpt = pdb_bkpt_search(cr3, xen_regs->eip - 1); if ( (bkpt == NULL) && !pdb_stepping && !pdb_system_call && xen_regs->eip != pdb_system_call_next_addr + 1 && (exceptionVector != KEYPRESS_EXCEPTION) && xen_regs->eip < 0xc0000000) /* xenolinux for now! */ { TRC(printf("pdb: user bkpt (0x%x) at 0x%lx:0x%lx\n", exceptionVector, cr3, xen_regs->eip)); return 1; } <...>

As far as I can tell, what you should be doing is returning 1 immediately if pdb_initialized is equal to zero.

Thanks.

-Kip