On Mon Apr 27 16:44:05 2026 +0000, Twaik Yont wrote:
This is mainly for preserving existing semantics and compatibility within the shared code paths. The original wine_dbgstr_rect() relies on Wine TEB-backed state through the debug infrastructure. On pure Java threads there is no Wine TEB, and calling the standard helper results in a crash. Since parts of the ioctl path are intentionally shared between Wine and Java contexts, this provides a minimal local replacement that behaves similarly but does not depend on Wine thread state. The goal is to avoid duplicating the code paths or splitting the file while keeping logging behavior consistent. If preferred, I can look into restructuring things further to reduce the need for this, but for now this keeps the existing code working safely in both contexts with minimal changes. I think it would be better to have a clean separation and make it obvious which code is used on which side of the process boundary.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10710#note_137773