[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.