Skip to content

Commit 54579fe

Browse files
committed
More debugging
1 parent 2e622fd commit 54579fe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Modules/_remote_debugging_module.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,15 @@ create_task_result(
976976
goto error;
977977
}
978978

979+
PyObject* task_name = parse_task_name(unwinder, task_address);
980+
if (PyUnicode_CheckExact(task_name)) {
981+
printf("TASK NAME = %s\n", PyUnicode_AsUTF8(task_name));
982+
} else if (PyLong_CheckExact(task_name)) {
983+
printf("TASK NAME = %ld\n", PyLong_AsLong(task_name));
984+
} else {
985+
printf("Task name=%p\n", task_name);
986+
}
987+
979988
// Parse coroutine chain
980989
if (_Py_RemoteDebug_PagedReadRemoteMemory(&unwinder->handle, task_address,
981990
unwinder->async_debug_offsets.asyncio_task_object.size,

0 commit comments

Comments
 (0)