[Lldb-commits] [lldb] [lldb][test] Fix test_listener_event_process_state (TestMultithreaded.py) on Windows on Arm (PR #227605)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 30 02:16:24 PDT 2026
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/227605
>From 678ae61957f5d49e9564f408ac716308a6b85245 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 30 Sep 2026 08:28:36 +0000
Subject: [PATCH 1/2] [lldb][test] Fix test_listener_event_process_state on
Windows on Arm
This test expects to be sent function names by another thread.
Function names are allowed to be null, but the sending thread
only sent them when they were non-null.
On Windows on Arm, for whatever reasion, all the functions have
no name during the test. This is despite lldb being able to show
them:
```
* thread #1, stop reason = breakpoint 1.1
* frame #0: 0x00007ff71d191008 inferior_program`int next(void) at inferior.cpp:6:13
frame #1: 0x00007ff71d19107c inferior_program`main at inferior.cpp:13:9
frame #2: 0x00007ff71d1cc994 inferior_program`
```
The test is not about whether we parse debug info properly,
and I am not about to dive into that anyway. So I think it's
better to adapt the test to only care that some function was
found. The function's name is just a token to say that, empty
or otherwise.
---
.../test_listener_event_process_state.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp b/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
index 1089d8cb304cf..7cb9389f23f7f 100644
--- a/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
+++ b/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
@@ -54,8 +54,10 @@ void listener_func() {
for (int j = 0; j < num_frames; ++j) {
const char *function_name =
thread.GetFrameAtIndex(j).GetSymbol().GetName();
- if (function_name)
- g_frame_functions.push(string(function_name));
+ // The function name is allowed to be null, all we care about here
+ // is that some function was found.
+ g_frame_functions.push(function_name ? string(function_name)
+ : string());
}
}
}
@@ -63,10 +65,9 @@ void listener_func() {
}
void check_listener(SBDebugger &dbg) {
- // check thread description
- bool got_description = false;
+ bool got_function_name = false;
string func_name = g_frame_functions.pop(got_description);
- if (got_description == false)
+ if (got_function_name == false)
throw Exception("Expected at least one frame function");
}
>From 954613d54099f7e20e0c679ed4be8e24233c345e Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 30 Sep 2026 09:16:00 +0000
Subject: [PATCH 2/2] typo
---
.../API/api/multithreaded/test_listener_event_process_state.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp b/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
index 7cb9389f23f7f..7c81938e6e26f 100644
--- a/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
+++ b/lldb/test/API/api/multithreaded/test_listener_event_process_state.cpp
@@ -66,7 +66,7 @@ void listener_func() {
void check_listener(SBDebugger &dbg) {
bool got_function_name = false;
- string func_name = g_frame_functions.pop(got_description);
+ string func_name = g_frame_functions.pop(got_function_name);
if (got_function_name == false)
throw Exception("Expected at least one frame function");
More information about the lldb-commits
mailing list