[Lldb-commits] [lldb] 090b123 - [lldb][test] Handle None function name in frame provider tests (#226936)

via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 01:03:03 PDT 2026


Author: David Spickett
Date: 2026-09-29T08:02:55Z
New Revision: 090b123694953beeb55d003e45c24372858b29b8

URL: https://github.com/llvm/llvm-project/commit/090b123694953beeb55d003e45c24372858b29b8
DIFF: https://github.com/llvm/llvm-project/commit/090b123694953beeb55d003e45c24372858b29b8.diff

LOG: [lldb][test] Handle None function name in frame provider tests (#226936)

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.

Added: 
    

Modified: 
    lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
    lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/frame_provider.py

Removed: 
    


################################################################################
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..b2e37089f7ade 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,12 +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):
         """
         Test that a provider can read every frame from its parent list and

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


        


More information about the lldb-commits mailing list