Page MenuHomePhabricator

[PATCH] [debugserver/ARM64] Make sure watchpoints hit are attributed correctly.
ClosedPublic

Authored by davide on Mar 31 2020, 1:59 PM.

Details

Reviewers
jasonmolenda
Summary

From e330facaea0c3780734a6a061134551662fb9d74 Mon Sep 17 00:00:00 2001
From: Davide Italiano <ditaliano@apple.com>
Date: Tue, 31 Mar 2020 13:55:36 -0700
Subject: [PATCH] [debugserver/ARM64] Make sure watchpoints hit are attributed
correctly.

This didn't happen for arm64 if you have watches for variables
that are contigous in memory.

rdar://problem/55135006

.../watchpoints/watchpoint_count/Makefile | 3 ++
.../watchpoint_count/TestWatchpointCount.py | 43 +++++++++++++++++++
.../watchpoints/watchpoint_count/main.c | 13 ++++++
.../source/MacOSX/arm64/DNBArchImplARM64.cpp | 43 ++++++++++---------
4 files changed, 82 insertions(+), 20 deletions(-)
create mode 100644 lldb/test/API/commands/watchpoints/watchpoint_count/Makefile
create mode 100644 lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
create mode 100644 lldb/test/API/commands/watchpoints/watchpoint_count/main.c

Diff Detail

Event Timeline

davide created this revision.Mar 31 2020, 1:59 PM
jasonmolenda accepted this revision.Mar 31 2020, 3:04 PM

I was a little worried about the case where we have an 8-byte region being watched that is 4-byte aligned (so it's spanning two 8-byte watchpoints), but a quick test of that with this patch shows it works correctly. This is fine with me.

This revision is now accepted and ready to land.Mar 31 2020, 3:04 PM
davide closed this revision.Apr 6 2020, 6:15 PM