On Thu, 13 Feb 2003 15:59:45 +0800, 
"Zhang, Sonic" <[EMAIL PROTECTED]> wrote:
>       Current implementation in kdb-v3.0-2.4.20 sees a local breakpoint as
>an equivalence of a global breakpoint. All CPUs share the same data
>structure for hardware debug registers. And each CPU sets its debug register
>for a hardware breakpoint, no matter whether it is a local one of the other
>CPUs.

Where do you get that from?  kdb_bp_install_local() is

void
kdb_bp_install_local(struct pt_regs *regs)
{
        int i;

        for(i=0; i<KDB_MAXBPT; i++) {
                if (KDB_DEBUG(BP)) {
                        kdb_printf("kdb_bp_install_local bp %d bp_enabled %d bp_global 
%d cpu %d bp_cpu %d\n",
                                i, kdb_breakpoints[i].bp_enabled, 
kdb_breakpoints[i].bp_global,
                                smp_processor_id(), kdb_breakpoints[i].bp_cpu);
                }
                if (kdb_breakpoints[i].bp_enabled
                 && kdb_breakpoints[i].bp_cpu == smp_processor_id()
                 && !kdb_breakpoints[i].bp_global){
                        kdba_installbp(regs, &kdb_breakpoints[i]);
                }
        }
}

That function is called for each cpu as it leaves kdb.  It only
installs local breakpoints for the current cpu.

kdb_bp() has
        if (hardware && !global) {
                bp->bp_global = 0;
                bp->bp_cpu = smp_processor_id();
        }
marking local breakpoints by their cpu number.


Reply via email to