From 14a4b60fa9eb2484492b027b8cdba13a1b5807df Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Tue, 29 Jul 2025 23:56:37 -0300 Subject: [PATCH 1/3] Fix numbered list syntax --- Doc/howto/remote_debugging.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/howto/remote_debugging.rst b/Doc/howto/remote_debugging.rst index 3adb6ad03e5445..434812bec449a3 100644 --- a/Doc/howto/remote_debugging.rst +++ b/Doc/howto/remote_debugging.rst @@ -374,13 +374,13 @@ To locate a thread: reliable thread to target. 3. Optionally, use the offset ``interpreter_state.threads_head`` to iterate -through the linked list of all thread states. Each ``PyThreadState`` structure -contains a ``native_thread_id`` field, which may be compared to a target thread -ID to find a specific thread. + through the linked list of all thread states. Each ``PyThreadState`` + structure contains a ``native_thread_id`` field, which may be compared to + a target thread ID to find a specific thread. -1. Once a valid ``PyThreadState`` has been found, its address can be used in -later steps of the protocol, such as writing debugger control fields and -scheduling execution. +4. Once a valid ``PyThreadState`` has been found, its address can be used in + later steps of the protocol, such as writing debugger control fields and + scheduling execution. The following is an example implementation that locates the main thread state:: From c190320f14a9aa5d667ebb850da69587b4b7a755 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Wed, 30 Jul 2025 00:09:46 -0300 Subject: [PATCH 2/3] lint --- Doc/howto/remote_debugging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/remote_debugging.rst b/Doc/howto/remote_debugging.rst index 434812bec449a3..b5eeb3f1537486 100644 --- a/Doc/howto/remote_debugging.rst +++ b/Doc/howto/remote_debugging.rst @@ -374,7 +374,7 @@ To locate a thread: reliable thread to target. 3. Optionally, use the offset ``interpreter_state.threads_head`` to iterate - through the linked list of all thread states. Each ``PyThreadState`` + through the linked list of all thread states. Each ``PyThreadState`` structure contains a ``native_thread_id`` field, which may be compared to a target thread ID to find a specific thread. From 1dadea59bb3151c7b4b555d8ca2ae3f8f59a9472 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Wed, 30 Jul 2025 00:25:12 -0300 Subject: [PATCH 3/3] Align unnumbered list --- Doc/howto/remote_debugging.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/howto/remote_debugging.rst b/Doc/howto/remote_debugging.rst index b5eeb3f1537486..b7323803654628 100644 --- a/Doc/howto/remote_debugging.rst +++ b/Doc/howto/remote_debugging.rst @@ -454,15 +454,15 @@ its fields are defined by the ``_Py_DebugOffsets`` structure and include the following: - ``debugger_script_path``: A fixed-size buffer that holds the full path to a - Python source file (``.py``). This file must be accessible and readable by - the target process when execution is triggered. + Python source file (``.py``). This file must be accessible and readable by + the target process when execution is triggered. - ``debugger_pending_call``: An integer flag. Setting this to ``1`` tells the - interpreter that a script is ready to be executed. + interpreter that a script is ready to be executed. - ``eval_breaker``: A field checked by the interpreter during execution. - Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this - field causes the interpreter to pause and check for debugger activity. + Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this + field causes the interpreter to pause and check for debugger activity. To complete the injection, the debugger must perform the following steps: