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

 

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to