@@ -1125,6 +1125,38 @@ class StopInfoUnixSignal : public StopInfo {
std::optional m_code;
};
+// StopInfoInterrupt
+
+class StopInfoInterrupt : public StopInfo {
+public:
+ StopInfoInterrupt(Thread , int signo, const char *description)
+ : StopInfo(thread, signo) {
+
@@ -3905,9 +3911,14 @@ thread_result_t Process::RunPrivateStateThread(bool
is_secondary_thread) {
if (interrupt_requested) {
if (StateIsStoppedState(internal_state, true)) {
- // We requested the interrupt, so mark this as such in the stop event
-
@@ -440,6 +440,12 @@ class ProcessGDBRemote : public Process,
void HandleStopReply() override;
void HandleAsyncStructuredDataPacket(llvm::StringRef data) override;
+ // Handle thread specific async interrupt and return the original thread
+ // that requested the async
@@ -42,8 +45,13 @@ class ThreadPlanStepOverRange : public ThreadPlanStepRange,
void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info);
bool IsEquivalentContext(const SymbolContext );
+ // Clear and create a new ThreadPlanSingleThreadTimeout to detect if
@@ -0,0 +1,96 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -1312,10 +1312,16 @@ class Process : public
std::enable_shared_from_this,
size_t GetThreadStatus(Stream , bool only_threads_with_stop_reason,
uint32_t start_frame, uint32_t num_frames,
- uint32_t num_frames_with_source,
-
@@ -1312,10 +1312,16 @@ class Process : public
std::enable_shared_from_this,
size_t GetThreadStatus(Stream , bool only_threads_with_stop_reason,
uint32_t start_frame, uint32_t num_frames,
- uint32_t num_frames_with_source,
-
jeffreytan81 wrote:
@jimingham, I have revised the PR, let me know when you can review again.
Thanks.
https://github.com/llvm/llvm-project/pull/90930
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -1312,11 +1312,13 @@ class Process : public
std::enable_shared_from_this,
size_t GetThreadStatus(Stream , bool only_threads_with_stop_reason,
uint32_t start_frame, uint32_t num_frames,
- uint32_t num_frames_with_source,
-
@@ -590,6 +591,7 @@ class ThreadPlanNull : public ThreadPlan {
const Status () { return m_status; }
protected:
+ friend class ThreadPlanSingleThreadTimeout;
jeffreytan81 wrote:
Hmm, I thought there is a reason I can't remember, apparently not. Removed.
https://github.com/jeffreytan81 updated
https://github.com/llvm/llvm-project/pull/90930
>From b72df8cf2a047ed731913609b58bdb4a3601e111 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Thu, 2 May 2024 18:12:04 -0700
Subject: [PATCH 1/4] Single thread timeout feature
---
@@ -0,0 +1,93 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,93 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,93 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,93 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,93 @@
+//===-- ThreadPlanSingleThreadTimeout.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -590,6 +591,7 @@ class ThreadPlanNull : public ThreadPlan {
const Status () { return m_status; }
protected:
+ friend class ThreadPlanSingleThreadTimeout;
jimingham wrote:
What is this needed for? It's a little odd having a derived class friended to
@@ -1312,11 +1312,13 @@ class Process : public
std::enable_shared_from_this,
size_t GetThreadStatus(Stream , bool only_threads_with_stop_reason,
uint32_t start_frame, uint32_t num_frames,
- uint32_t num_frames_with_source,
-
jimingham wrote:
Thanks for working up this patch. I should be able to get time to look at this
next week.
https://github.com/llvm/llvm-project/pull/90930
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
jeffreytan81 wrote:
@jimingham, friendly ping. @clayborg mentioned that you are the sole domain
expert on ThreadPlan. Can you help to review this change? Thanks
https://github.com/llvm/llvm-project/pull/90930
___
lldb-commits mailing list
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: None (jeffreytan81)
Changes
This PR introduces a new `ThreadPlanSingleThreadTimeout` that will be used to
address potential deadlock during single-thread stepping.
While debugging a target with a non-trivial number of threads (around
https://github.com/jeffreytan81 ready_for_review
https://github.com/llvm/llvm-project/pull/90930
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/jeffreytan81 edited
https://github.com/llvm/llvm-project/pull/90930
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/jeffreytan81 updated
https://github.com/llvm/llvm-project/pull/90930
>From b72df8cf2a047ed731913609b58bdb4a3601e111 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Thu, 2 May 2024 18:12:04 -0700
Subject: [PATCH 1/3] Single thread timeout feature
---
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff cf3c714e4bd7b8a68793f2827080fe3388ae8bb1
d125c5a761a70b024afb16d22b4326df4071e04b --
https://github.com/jeffreytan81 updated
https://github.com/llvm/llvm-project/pull/90930
>From b72df8cf2a047ed731913609b58bdb4a3601e111 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Thu, 2 May 2024 18:12:04 -0700
Subject: [PATCH 1/2] Single thread timeout feature
---
https://github.com/jeffreytan81 created
https://github.com/llvm/llvm-project/pull/90930
None
>From b72df8cf2a047ed731913609b58bdb4a3601e111 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Thu, 2 May 2024 18:12:04 -0700
Subject: [PATCH] Single thread timeout feature
---
27 matches
Mail list logo