[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
Mon Sep 28 04:03:07 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/2] [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 18344208cac56..c73aefdf29367 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/2] 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 06073fe6f4ba7..9eb52494163ec 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):
         """



More information about the lldb-commits mailing list