No description
Find a file
Erik van der Kouwe b42c66ed10 this patch adds access to the debug breakpoints to
the kernel. They are not used atm, but having them in trunk allows them
to be easily used when needed. To set a breakpoint that triggers when
the variable foo is written to (the most common use case), one calls:

breakpoint_set(vir2phys((vir_bytes) &foo), 0,
  BREAKPOINT_FLAG_MODE_GLOBAL |
  BREAKPOINT_FLAG_RW_WRITE |
  BREAKPOINT_FLAG_LEN_4);

It can later be disabled using:

breakpoint_set(vir2phys((vir_bytes) &foo), 0,
  BREAKPOINT_FLAG_MODE_OFF);

There are some limitations:

- There are at most four breakpoints (hardware limit); the index of the
  breakpoint (0-3) is specified as the second parameter of
  breakpoint_set.

- The breakpoint exception in the kernel is not handled and causes a
  panic; it would be reasonably easy to change this by inspecing DR6,
  printing a message, disabling the breakpoint and continuing. However,
  in my experience even just a panic can be very useful.

- Breakpoints can be set only in the part of the address space that is
  in every page table. It is useful for the kernel, but to use this for
  user processes would require saving and restoring the debug registers
  as part of the context switch. Although the CPU provides support for
  local breakpoints (I implemened this as BREAKPOINT_FLAG_LOCAL) they
  only work if task switching is used.
2010-03-19 19:15:20 +00:00
benchmarks only check local benchmark dir if it exists 2010-02-04 18:15:10 +00:00
boot Work around KVM unreal mode bug by avoiding unreal mode 2010-03-10 15:32:31 +00:00
commands this patch adds access to the debug breakpoints to 2010-03-19 19:15:20 +00:00
docs this patch adds access to the debug breakpoints to 2010-03-19 19:15:20 +00:00
drivers New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
etc New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
include Add a define for NSIG. 2010-03-17 13:43:34 +00:00
kernel this patch adds access to the debug breakpoints to 2010-03-19 19:15:20 +00:00
lib New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
man New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
servers VM: fix kernel mappings for children of non-paged parents. 2010-03-18 17:17:31 +00:00
test New RS and new signal handling for system processes. 2010-03-17 01:15:29 +00:00
tools Fix bug item #405: missing # in front of comment 2010-03-15 10:42:51 +00:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile Convert man/ over to new make 2010-03-16 00:15:43 +00:00