ntdll: Store the debug info for the initial thread next to the PEB.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-04-27 12:41:10 +02:00
parent 789c1db18a
commit 616415a6df
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}