[Lldb-commits] [lldb] [lldb] Correct types for ScriptedFrame get_function_name get_display_function_name (PR #226938)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 28 02:59:04 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: David Spickett (DavidSpickett)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/226938.diff
1 Files Affected:
- (modified) lldb/examples/python/templates/scripted_process.py (+2-2)
``````````diff
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:
``````````
</details>
https://github.com/llvm/llvm-project/pull/226938
More information about the lldb-commits
mailing list