[Lldb-commits] [PATCH] Report stopped by trace if none of the watchpoint was hit

Jason Molenda jmolenda at apple.com
Tue Mar 17 20:14:19 PDT 2015


On armv7 architecture systems, there are 4 hardware breakpoint registers (DBGBVR) and 4 hardware watchpoint registers (DBGWVR).  The breakpoint registers track values in the pc register.  You can also say "stop when the PC is not equal to this value" which is how single instruction stepping is done on armv7.

On armv8 architecture systems, AArch32 or AArch64, there is a single instruction step bit (MDSCR_EL1, SS bit) to accomplish this more simply.  There are still the dual sets of hardware breakpoint and hardware watchpoint registers -- but the hardware breakpoint registers don't have the "stop when the PC is not equal to this value" capability.

The kernel should have no problem distinguishing between an MDSCR_EL1 SS bit stop event and a watchpoint exception (on armv8 systems).  On an armv7 system, it's possible to distinguish between a breakpoint and watchpoint event.  And exhausting the watchpoint register file won't prevent stepping from working.

fwiw, lldb today doesn't use the hardware breakpoints, except for single stepping on armv7 systems.  breakpoint set does have the --hardware option to request that the remote gdb stub use a hardware breakpoint if it has that capability.  But lldb doesn't do that on its own today.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8081

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list