[lldb-dev] Problem with watchpoints

Ted Woodward via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 8 16:47:00 PDT 2016


I recently discovered a problem with watchpoints talking to the Hexagon
simulator:

 

(lldb) w s e 0x1000

error: Watchpoint creation failed (addr=0x1000, size=4).

error: Target supports (0) hardware watchpoint slots.

 

 

It seems that lldb now sends a qWatchpointSupportInfo packet. But this
packet isn't defined in lldb-gdb-remote.txt.

 

Looking at the code, it expects to get back a pair "num:#". If it doesn't it
returns 0. The caller will report the above error if the number returned is
0. So if qWatchpointSupportInfo isn't supported, lldb can't set a
watchpoint.

 

 

What is the definition of the response to qWatchpointSupportInfo? Is the the
number of supported watchpoints, or the number of available watchpoints? If
it's supported, then CheckIfWatchpointsExhausted won't really check if the
watchpoints are exhausted. If it's available, then a return of 0 doesn't let
us aggregate watchpoints - a 4 byte watchpoint at 0x1000 and one at 0x1004
could be one going from 0x1000-0x1007.

 

 

Wouldn't it be better to try to set the watchpoint, then report a failure if
we get an error back from the remote server?

 

--

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160908/4e874a6a/attachment.html>


More information about the lldb-dev mailing list