Commit Graph

6 Commits

Author SHA1 Message Date
Pablo Galindo Salgado 0909d6d8e8
gh-91048: Add better error messages for remote debugging for CI builds (#134682) 2025-05-26 15:31:47 +01:00
Russell Keith-Magee 965662ee4a
gh-91048: Correct Apple platform includes for iOS. (#134712)
Correct Apple platform includes for iOS.
2025-05-26 12:44:41 +00:00
Pablo Galindo Salgado 42b25ad4d3
gh-91048: Refactor and optimize remote debugging module (#134652)
Completely refactor Modules/_remote_debugging_module.c with improved
code organization, replacing scattered reference counting and error
handling with centralized goto error paths. This cleanup improves
maintainability and reduces code duplication throughout the module while
preserving the same external API.

Implement memory page caching optimization in Python/remote_debug.h to
avoid repeated reads of the same memory regions during debugging
operations. The cache stores previously read memory pages and reuses
them for subsequent reads, significantly reducing system calls and
improving performance.

Add code object caching mechanism with a new code_object_generation
field in the interpreter state that tracks when code object caches need
invalidation. This allows efficient reuse of parsed code object metadata
and eliminates redundant processing of the same code objects across
debugging sessions.

Optimize memory operations by replacing multiple individual structure
copies with single bulk reads for the same data structures. This reduces
the number of memory operations and system calls required to gather
debugging information from the target process.

Update Makefile.pre.in to include Python/remote_debug.h in the headers
list, ensuring that changes to the remote debugging header force proper
recompilation of dependent modules and maintain build consistency across
the codebase.

Also, make the module compatible with the free threading build as an extra :)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-25 20:19:29 +00:00
Sergey Miryanov bd2ed7c7ce
gh-91048: Chain some exceptions in _testexternalinspection.c (#132970) 2025-05-03 01:35:30 +02:00
Victor Stinner 17718b0503
gh-91048: Fix _testexternalinspection.c on FreeBSD (#132945) 2025-04-25 14:57:01 +00:00
Pablo Galindo Salgado e8cf3a1a64
gh-91048: Refactor _testexternalinspection and add Windows support (#132852) 2025-04-25 14:12:16 +01:00