Module: wine Branch: master Commit: 616415a6df9e23ed0dfa83b74de90b95f7fabbc8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=616415a6df9e23ed0dfa83b74...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Apr 27 12:41:10 2021 +0200
ntdll: Store the debug info for the initial thread next to the PEB.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/debug.c | 1 - dlls/ntdll/unix/virtual.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/debug.c b/dlls/ntdll/unix/debug.c index 368baac46f4..e6c3f67523e 100644 --- a/dlls/ntdll/unix/debug.c +++ b/dlls/ntdll/unix/debug.c @@ -294,6 +294,5 @@ void dbg_init(void) { setbuf( stdout, NULL ); setbuf( stderr, NULL ); - ntdll_get_thread_data()->debug_info = &initial_info; init_done = TRUE; } diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 14c984b27bf..f3e6b612b93 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2890,6 +2890,7 @@ static TEB *init_teb( void *ptr, PEB *peb ) */ TEB *virtual_alloc_first_teb(void) { + struct ntdll_thread_data *thread_data; TEB *teb; PEB *peb; void *ptr; @@ -2916,6 +2917,8 @@ TEB *virtual_alloc_first_teb(void) peb = init_peb( (char *)teb_block + 31 * block_size ); teb = init_teb( ptr, peb ); *(ULONG_PTR *)&peb->CloudFileFlags = get_image_address(); + thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch; + thread_data->debug_info = (struct debug_info *)((char *)teb_block + 31 * block_size + 2 * page_size); return teb; }