Skip to content

Commit bb9c4bb

Browse files
committed
fixup! PEP 768: Add some clarifications for buffer size
1 parent 7a9768c commit bb9c4bb

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

peps/pep-0768.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ A new structure is added to PyThreadState to support remote debugging:
137137
typedef struct _remote_debugger_support {
138138
int debugger_pending_call;
139139
char debugger_script_path[MAX_SCRIPT_PATH_SIZE];
140-
Py_ssize_t debugger_buffer_size;
140+
char *debugger_buffer;
141141
} _PyRemoteDebuggerSupport;
142142
143143
This structure is appended to ``PyThreadState``, adding only a few fields that
@@ -149,7 +149,7 @@ The value for ``MAX_SCRIPT_PATH_SIZE`` will be a trade-off between binary size
149149
and how big debugging scripts paths can be. To limit the memory overhead per
150150
thread we will be limiting this to 512 bytes. This size will also be provided as
151151
part of the debugger support structure so debuggers know how much they can
152-
write. This value can be extended in the future if we ever need to.
152+
write. This value can be extended in the future if we ever need to.
153153

154154

155155
Debug Offsets Table
@@ -168,18 +168,20 @@ debugger support:
168168
.. code-block:: C
169169
170170
struct _debugger_support {
171-
uint64_t eval_breaker; // Location of the eval breaker flag
172-
uint64_t remote_debugger_support; // Offset to our support structure
173-
uint64_t debugger_pending_call; // Where to write the pending flag
174-
uint64_t debugger_script; // Where to write the script path
171+
uint64_t eval_breaker; // Location of the eval breaker flag
172+
uint64_t remote_debugger_support; // Offset to our support structure
173+
uint64_t debugger_pending_call; // Where to write the pending flag
174+
uint64_t debugger_script_path; // Where to write the script path
175+
uint64_t debugger_script_path_size; // Size of the script path buffer
175176
} debugger_support;
176177
177178
These offsets allow debuggers to locate critical debugging control structures in
178179
the target process's memory space. The ``eval_breaker`` and ``remote_debugger_support``
179180
offsets are relative to each ``PyThreadState``, while the ``debugger_pending_call``
180181
and ``debugger_script`` offsets are relative to each ``_PyRemoteDebuggerSupport``
181182
structure, allowing the new structure and its fields to be found regardless of
182-
where they are in memory.
183+
where they are in memory. ``debugger_script_path_sizee`` informs the attaching
184+
tool of the size of the buffer.
183185

184186
Attachment Protocol
185187
-------------------

0 commit comments

Comments
 (0)