@@ -723,44 +723,39 @@ _remote_debugging_RemoteUnwinder_get_stack_trace_impl(RemoteUnwinderObject *self
723723@critical_section
724724_remote_debugging.RemoteUnwinder.get_all_awaited_by
725725
726- Get all tasks and their awaited_by relationships from the remote process.
727-
728- This provides a tree structure showing which tasks are waiting for other tasks.
726+ Returns:
727+ A list of AwaitedInfo objects, where each object contains:
729728
730- For each task, returns:
731- 1. The call stack frames leading to where the task is currently executing
732- 2. The name of the task
733- 3. A list of tasks that this task is waiting for, with their own frames/names/etc
729+ - thread_id (int): Identifier of the thread.
730+ - awaited_by (list[TaskInfo]): List of TaskInfo objects representing tasks
731+ awaiting this thread.
734732
735- Returns a list of [frames, task_name, subtasks] where:
736- - frames: List of (func_name, filename, lineno) showing the call stack
737- - task_name: String identifier for the task
738- - subtasks: List of tasks being awaited by this task, in same format
733+ Each TaskInfo contains:
734+ - task_id (int): Identifier of the task.
735+ - task_name (str): Name of the task.
736+ - coroutine_stack (list[CoroInfo]): Stack of coroutine frames.
737+ - awaited_by (list[TaskInfo]): Nested tasks awaited by this task.
739738
740739Raises:
741740 RuntimeError: If AsyncioDebug section is not available in the remote process
742741 MemoryError: If memory allocation fails
743742 OSError: If reading from the remote process fails
744743
745744Example output:
746- [
747- # Task c2_root waiting for two subtasks
745+
748746 [
749- # Call stack of c2_root
750- [("c5", "script.py", 10), ("c4", "script.py", 14)],
751- "c2_root",
752- [
753- # First subtask (sub_main_2) and what it's waiting for
754- [
755- [("c1", "script.py", 23)],
756- "sub_main_2",
757- [...]
758- ],
759- # Second subtask and its waiters
760- [...]
761- ]
747+ AwaitedInfo(
748+ thread_id=12345,
749+ awaited_by=[
750+ TaskInfo(
751+ task_id=1,
752+ task_name="Task-1",
753+ coroutine_stack=[...],
754+ awaited_by=[]
755+ )
756+ ]
757+ )
762758 ]
763- ]
764759[clinic start generated code]*/
765760
766761static PyObject *
0 commit comments