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

2015-03-17 Thread Jason Molenda
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/



___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


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

2015-03-17 Thread Pavel Labath
It could be that the kernel reports a watchpoint hit on single stepping because 
on arm single stepping is actually implemented using hardware breakpoints. This 
is just a guess, but in any case it might be interesting to create a test case, 
which what happens with single stepping after we have set the maximum number of 
watchpoints possible. Does single stepping still work? Do some of our 
watchpoints get overwritten, etc.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8081

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



___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


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

2015-03-06 Thread Jim Ingham
The approach looks right.  I'll let somebody who works on the NativeThread side 
weigh in on whether the implementation is correct.


http://reviews.llvm.org/D8081

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



___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


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

2015-03-06 Thread Tamas Berghammer
Thanks for noticing this bug and for all of the suggestions. I created a new 
fix what address the actual root cause of the problem with reporting the right 
stop reason from lldb-server.

For ARMv8 the watchpoint handling is not implemented yet, but it should be 
possible to implement the IsWatchpointHit function.


http://reviews.llvm.org/D8081

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



___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits