[Lldb-commits] [lldb] 6aeadac - [lldb] Correct types for ScriptedFrame get_function_name get_display_function_name (#226938)

via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 00:40:52 PDT 2026


Author: David Spickett
Date: 2026-09-29T08:40:38+01:00
New Revision: 6aeadac52d4f564e5030a1a22013ab381436cce3

URL: https://github.com/llvm/llvm-project/commit/6aeadac52d4f564e5030a1a22013ab381436cce3
DIFF: https://github.com/llvm/llvm-project/commit/6aeadac52d4f564e5030a1a22013ab381436cce3.diff

LOG: [lldb] Correct types for ScriptedFrame get_function_name get_display_function_name (#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.

Added: 
    

Modified: 
    lldb/examples/python/templates/scripted_process.py

Removed: 
    


################################################################################
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