diff --git a/src/chatdbg/chatdbg_gdb.py b/src/chatdbg/chatdbg_gdb.py index 485afe2..6d64d28 100644 --- a/src/chatdbg/chatdbg_gdb.py +++ b/src/chatdbg/chatdbg_gdb.py @@ -88,7 +88,7 @@ def invoke(self, arg, from_tty, really_run=True): Why() -def buildPrompt() -> str: +def buildPrompt() -> tuple[str, str, str]: thread = gdb.selected_thread() if not thread: return "" diff --git a/src/chatdbg/chatdbg_lldb.py b/src/chatdbg/chatdbg_lldb.py index 4d2f567..f26a822 100644 --- a/src/chatdbg/chatdbg_lldb.py +++ b/src/chatdbg/chatdbg_lldb.py @@ -117,16 +117,14 @@ def truncate_string(string, n): def buildPrompt(debugger: Any) -> Tuple[str, str, str]: - import os - target = get_target() if not target: - return "" + return ("", "", "") thread = get_thread() if not thread: - return "" + return ("", "", "") if thread.GetStopReason() == lldb.eStopReasonBreakpoint: - return "" + return ("", "", "") frame = thread.GetFrameAtIndex(0) stack_trace = "" source_code = ""