| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -374,13 +374,13 @@ To locate a thread: | |||
| 374 | 374 | reliable thread to target. | |
| 375 | 375 | ||
| 376 | 376 | 3. Optionally, use the offset ``interpreter_state.threads_head`` to iterate | |
| 377 | - through the linked list of all thread states. Each ``PyThreadState`` structure | ||
| 378 | - contains a ``native_thread_id`` field, which may be compared to a target thread | ||
| 379 | - ID to find a specific thread. | ||
| 377 | + through the linked list of all thread states. Each ``PyThreadState`` | ||
| 378 | + structure contains a ``native_thread_id`` field, which may be compared to | ||
| 379 | + a target thread ID to find a specific thread. | ||
| 380 | 380 | ||
| 381 | - 1. Once a valid ``PyThreadState`` has been found, its address can be used in | ||
| 382 | - later steps of the protocol, such as writing debugger control fields and | ||
| 383 | - scheduling execution. | ||
| 381 | + 4. Once a valid ``PyThreadState`` has been found, its address can be used in | ||
| 382 | + later steps of the protocol, such as writing debugger control fields and | ||
| 383 | + scheduling execution. | ||
| 384 | 384 | ||
| 385 | 385 | The following is an example implementation that locates the main thread state:: | |
| 386 | 386 | ||
@@ -454,15 +454,15 @@ its fields are defined by the ``_Py_DebugOffsets`` structure and include the | |||
| 454 | 454 | following: | |
| 455 | 455 | ||
| 456 | 456 | - ``debugger_script_path``: A fixed-size buffer that holds the full path to a | |
| 457 | - Python source file (``.py``). This file must be accessible and readable by | ||
| 458 | - the target process when execution is triggered. | ||
| 457 | + Python source file (``.py``). This file must be accessible and readable by | ||
| 458 | + the target process when execution is triggered. | ||
| 459 | 459 | ||
| 460 | 460 | - ``debugger_pending_call``: An integer flag. Setting this to ``1`` tells the | |
| 461 | - interpreter that a script is ready to be executed. | ||
| 461 | + interpreter that a script is ready to be executed. | ||
| 462 | 462 | ||
| 463 | 463 | - ``eval_breaker``: A field checked by the interpreter during execution. | |
| 464 | - Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this | ||
| 465 | - field causes the interpreter to pause and check for debugger activity. | ||
| 464 | + Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this | ||
| 465 | + field causes the interpreter to pause and check for debugger activity. | ||
| 466 | 466 | ||
| 467 | 467 | To complete the injection, the debugger must perform the following steps: | |
| 468 | 468 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments