From: Alex Ho Subject: Re: pdb entered even when set to none Date: Tue, 08 Jun 2004 08:39:30 +0100 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: References: <20040607165603.M9981@demos.bsdclusters.com> Return-path: In-Reply-To: Your message of "Mon, 07 Jun 2004 17:11:57 PDT." <20040607165603.M9981@demos.bsdclusters.com> Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Kip Macy Cc: Xen list List-Id: xen-devel@lists.xenproject.org oops. good point. the alternative is to always run with pdb initialized :) i'll check in a fix later this morning. .a -- begin message 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 -- end message ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org