[Lldb-commits] [lldb] [lldb] Correct types for ScriptedFrame get_function_name get_display_function_name (PR #226938)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 28 02:58:07 PDT 2026
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/226938
These claimed to return str but the initial value for self.name is None, and the C++ side returns optional<string>. So I think optional string is correct here.
>From 1755373141955d1144fc5fcf25c003cb913dfd5c Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Mon, 28 Sep 2026 09:54:52 +0000
Subject: [PATCH] [lldb] Correct types for ScriptedFrame get_function_name
get_display_function_name
These claimed to return str but the initial value for self.name
is None, and the C++ side returns optional<string>. So I think
optional string is correct here.
---
lldb/examples/python/templates/scripted_process.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lldb/examples/python/templates/scripted_process.py b/lldb/examples/python/templates/scripted_process.py
index 6c2697cb9aa95..3275713cc960a 100644
--- a/lldb/examples/python/templates/scripted_process.py
+++ b/lldb/examples/python/templates/scripted_process.py
@@ -578,7 +578,7 @@ def is_hidden(self) -> bool:
"""
return False
- def get_function_name(self) -> str:
+ def get_function_name(self) -> Optional[str]:
"""Get the scripted frame function name.
Returns:
@@ -586,7 +586,7 @@ def get_function_name(self) -> str:
"""
return self.name
- def get_display_function_name(self) -> str:
+ def get_display_function_name(self) -> Optional[str]:
"""Get the scripted frame display function name.
Returns:
More information about the lldb-commits
mailing list