WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] pdb entered even when set to none

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





-------------------------------------------------------
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>