[Lldb-commits] [lldb] [lldb][test] Handle None function name in frame provider tests (PR #226936)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 29 00:42:20 PDT 2026
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/226936
>From 33953914374b408fa6392b9d6588ed0259311635 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Mon, 28 Sep 2026 09:45:54 +0000
Subject: [PATCH 1/3] [lldb][test] Handle None function name in frame provider
tests
Fixes #191859.
On Arm one of the functions has no name, which is a valid state.
Num frames: 7
0 frame #0: 0x092a151c a.out`baz at main.c:5:3 --name: baz
1 frame #1: 0x092a1540 a.out`bar at main.c:10:10 --name: bar
2 frame #2: 0x092a1560 a.out`foo at main.c:15:10 --name: foo
3 frame #3: 0x092a158c a.out`main at main.c:20:10 --name: main
4 frame #4: 0xf7ab939a libc.so.6` --name: None
5 frame #5: 0xf7ab943e libc.so.6`__libc_start_main + 94 --name: __libc_start_main
6 frame #6: 0x092a1434 a.out`_start + 40 --name: _start
The prefix provider needs to handle that possibility.
Though the Python type annotations on ScriptedFrame say that
the name methods return string, in reality they can return None,
which the C++ sides expect.
I will fix that in another PR.
---
.../pass_through_prefix/frame_provider.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/frame_provider.py b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/frame_provider.py
index 18344208cac56b..c73aefdf293676 100644
--- a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/frame_provider.py
+++ b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/frame_provider.py
@@ -19,7 +19,9 @@ def __init__(self, thread, idx, function_name, prefix):
super().__init__(thread, args)
self.idx = idx
- self.function_name = prefix + function_name
+ self.function_name = prefix
+ if function_name is not None:
+ self.function_name += function_name
def get_id(self):
return self.idx
>From 6739ffd7bffc7329446530c7f7df9d3d336e2a12 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Mon, 28 Sep 2026 11:02:50 +0000
Subject: [PATCH 2/3] remove the xfail
---
.../TestFrameProviderPassThroughPrefix.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
index 06073fe6f4ba74..9eb52494163ec7 100644
--- a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
+++ b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
@@ -24,11 +24,6 @@ def setUp(self):
TestBase.setUp(self)
self.source = "main.c"
- @expectedFailureAll(
- oslist=["linux"],
- archs=["arm$"],
- bugnumber="github.com/llvm/llvm-project/issues/191859",
- )
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_pass_through_with_prefix(self):
"""
>From 1fafb3d3d34958bd782f02dce1bf694b348c9e64 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Tue, 29 Sep 2026 08:42:04 +0100
Subject: [PATCH 3/3] Update TestFrameProviderPassThroughPrefix.py
remove windows xfail
---
.../pass_through_prefix/TestFrameProviderPassThroughPrefix.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
index 9eb52494163ec7..b2e37089f7ade0 100644
--- a/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
+++ b/lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
@@ -24,7 +24,6 @@ def setUp(self):
TestBase.setUp(self)
self.source = "main.c"
- @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_pass_through_with_prefix(self):
"""
Test that a provider can read every frame from its parent list and
More information about the lldb-commits
mailing list