[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 02:50:35 PDT 2026
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/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.
>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] [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
More information about the lldb-commits
mailing list