[Lldb-commits] [lldb] 4f5707e - Revert "This is a followup to https://reviews.llvm.org/D129814"
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 18 17:40:11 PDT 2022
Author: Jim Ingham
Date: 2022-07-18T17:37:13-07:00
New Revision: 4f5707e743528a0d40ac154e2e07705a03fd7ad3
URL: https://github.com/llvm/llvm-project/commit/4f5707e743528a0d40ac154e2e07705a03fd7ad3
DIFF: https://github.com/llvm/llvm-project/commit/4f5707e743528a0d40ac154e2e07705a03fd7ad3.diff
LOG: Revert "This is a followup to https://reviews.llvm.org/D129814"
This reverts commit 555ae5b8f5aa93ab090af853a8b7a83f815b3f20.
Apparently, there's something different about how Linux ARM handles watchpoints,
as all the watchpoint tests seem to stall on the Ubuntu aarch64 bots.
Reverting till I can get my hands on a linux system and see what is
wrong.
Added:
Modified:
lldb/source/Target/StopInfo.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index 17f6d15059e11..5cf0f760aa249 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -754,22 +754,15 @@ class StopInfoWatchpoint : public StopInfo {
bool ShouldStopSynchronous(Event *event_ptr) override {
// If we are running our step-over the watchpoint plan, stop if it's done
// and continue if it's not:
- if (m_should_stop_is_valid)
- return m_should_stop;
-
- // If we are running our step over plan, then stop here and let the regular
- // ShouldStop figure out what we should do: Otherwise, give our plan
- // more time to get run:
if (m_using_step_over_plan)
return m_step_over_plan_complete;
- Log *log = GetLog(LLDBLog::Process);
ThreadSP thread_sp(m_thread_wp.lock());
assert(thread_sp);
WatchpointSP wp_sp(
thread_sp->CalculateTarget()->GetWatchpointList().FindByID(GetValue()));
- // If we can no longer find the watchpoint, we just have to stop:
if (!wp_sp) {
+ Log *log = GetLog(LLDBLog::Process);
LLDB_LOGF(log,
"Process::%s could not find watchpoint location id: %" PRId64
@@ -803,42 +796,23 @@ class StopInfoWatchpoint : public StopInfo {
uint32_t num;
bool wp_triggers_after;
- if (!process_sp->GetWatchpointSupportInfo(num, wp_triggers_after)
+ if (process_sp->GetWatchpointSupportInfo(num, wp_triggers_after)
.Success()) {
- m_should_stop_is_valid = true;
- m_should_stop = true;
- return m_should_stop;
- }
-
- if (!wp_triggers_after) {
- // We have to step over the breakpoint before we know what to do:
+ if (wp_triggers_after)
+ return true;
+
StopInfoWatchpointSP me_as_siwp_sp
= std::static_pointer_cast<StopInfoWatchpoint>(shared_from_this());
ThreadPlanSP step_over_wp_sp(new ThreadPlanStepOverWatchpoint(
*(thread_sp.get()), me_as_siwp_sp, wp_sp));
Status error;
error = thread_sp->QueueThreadPlan(step_over_wp_sp, false);
- // If we couldn't push the thread plan, just stop here:
- if (!error.Success()) {
- LLDB_LOGF(log, "Could not push our step over watchpoint plan: %s",
- error.AsCString());
-
- m_should_stop = true;
- m_should_stop_is_valid = true;
- return true;
- } else {
- // Otherwise, don't set m_should_stop, we don't know that yet. Just
- // say we should continue:
- m_using_step_over_plan = true;
- return false;
- }
- } else {
- // We didn't have to do anything special here, so just return our value:
- m_should_stop_is_valid = true;
- return m_should_stop;
+ m_using_step_over_plan = true;
+ return !error.Success();
}
-
- return m_should_stop;
+ // If we don't have to step over the watchpoint, just let the PerformAction
+ // determine what we should do.
+ return true;
}
bool ShouldStop(Event *event_ptr) override {
More information about the lldb-commits
mailing list