@@ -908,23 +908,18 @@ _remote_debugging_RemoteUnwinder_get_stack_trace_impl(RemoteUnwinderObject *self
908908@critical_section
909909_remote_debugging.RemoteUnwinder.get_all_awaited_by
910910
911- Get all tasks and their awaited_by relationships from the remote process.
912-
913- This provides a tree structure showing which tasks are waiting for
914- other tasks.
911+ Returns:
912+ A list of AwaitedInfo objects, where each object contains:
915913
916- For each task, returns:
917- 1. The call stack frames leading to where the task is currently
918- executing
919- 2. The name of the task
920- 3. A list of tasks that this task is waiting for, with their own
921- frames/names/etc
914+ - thread_id (int): Identifier of the thread.
915+ - awaited_by (list[TaskInfo]): List of TaskInfo objects representing tasks
916+ awaiting this thread.
922917
923- Returns a list of [frames, task_name, subtasks] where :
924- - frames: List of (func_name, filename, lineno) showing the call
925- stack
926- - task_name: String identifier for the task
927- - subtasks: List of tasks being awaited by this task, in same format
918+ Each TaskInfo contains :
919+ - task_id (int): Identifier of the task.
920+ - task_name (str): Name of the task.
921+ - coroutine_stack (list[CoroInfo]): Stack of coroutine frames.
922+ - awaited_by (list[TaskInfo]): Nested tasks awaited by this task.
928923
929924Raises:
930925 RuntimeError: If AsyncioDebug section is not available in the
@@ -933,24 +928,20 @@ Returns a list of [frames, task_name, subtasks] where:
933928 OSError: If reading from the remote process fails
934929
935930Example output:
936- [
937- # Task c2_root waiting for two subtasks
931+
938932 [
939- # Call stack of c2_root
940- [("c5", "script.py", 10), ("c4", "script.py", 14)],
941- "c2_root",
942- [
943- # First subtask (sub_main_2) and what it's waiting for
944- [
945- [("c1", "script.py", 23)],
946- "sub_main_2",
947- [...]
948- ],
949- # Second subtask and its waiters
950- [...]
951- ]
933+ AwaitedInfo(
934+ thread_id=12345,
935+ awaited_by=[
936+ TaskInfo(
937+ task_id=1,
938+ task_name="Task-1",
939+ coroutine_stack=[...],
940+ awaited_by=[]
941+ )
942+ ]
943+ )
952944 ]
953- ]
954945[clinic start generated code]*/
955946
956947static PyObject *
0 commit comments