• J
    kgdb: add x86 HW breakpoints · 64e9ee30
    Jason Wessel 提交于
    Add HW breakpoints into the arch specific portion of x86 kgdb.  In the
    current x86 kernel.org kernels HW breakpoints are changed out in lazy
    fashion because there is no infrastructure around changing them when
    changing to a kernel task or entering the kernel mode via a system
    call.  This lazy approach means that if a user process uses HW
    breakpoints the kgdb will loose out.  This is an acceptable trade off
    because the developer debugging the kernel is assumed to know what is
    going on system wide and would be aware of this trade off.
    
    There is a minor bug fix to the kgdb core so as to correctly call the
    hw breakpoint functions with a valid value from the enum.
    
    There is also a minor change to the x86_64 startup code when using
    early HW breakpoints.  When the debugger is connected, the cpu startup
    code must not zero out the HW breakpoint registers or you cannot hit
    the breakpoints you are interested in, in the first place.
    Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    64e9ee30
kgdb.c 14.9 KB