[Lldb-commits] [PATCH] D13548: [LLDB][MIPS] fix watchpoint searched on client side for same masked variables

Mohit Bhakkad via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 8 03:15:14 PDT 2015


mohit.bhakkad created this revision.
mohit.bhakkad added reviewers: clayborg, jingham.
mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.

On MIPS architecture, it is possible to use same hardware register for 2 different variables with same watch mask(address & ~7).
wp_addr passed by server is sometime of other same masked variable, so we always rely on wp_hit_addr to search the 
correct watchpoint.

Repository:
  rL LLVM

http://reviews.llvm.org/D13548

Files:
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2105,6 +2105,8 @@
                             watch_id_t watch_id = LLDB_INVALID_WATCH_ID;
                             if (wp_addr != LLDB_INVALID_ADDRESS)
                             {
+                                if(wp_hit_addr != LLDB_INVALID_ADDRESS)
+                                    wp_addr = wp_hit_addr;
                                 WatchpointSP wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_addr);
                                 if (wp_sp)
                                 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13548.36838.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151008/f6bb899b/attachment.bin>


More information about the lldb-commits mailing list