Merge branch 'master5' into 'master'

ntdll: Support Ctrl-C stop debuggee and attach 32-bit process in wow64 mode.

See merge request wine/wine!6459
This commit is contained in:
JiangYi Chen 2024-11-19 01:35:48 +00:00
commit 64ef58ea37
3 changed files with 2 additions and 12 deletions

View file

@ -727,16 +727,6 @@ NTSTATUS WINAPI DbgUiIssueRemoteBreakin( HANDLE process )
status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process, status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process,
DbgUiRemoteBreakin, NULL, 0, 0, 0, 0, NULL ); DbgUiRemoteBreakin, NULL, 0, 0, 0, 0, NULL );
#ifdef _WIN64
/* FIXME: hack for debugging 32-bit wow64 process without a 64-bit ntdll */
if (status == STATUS_INVALID_PARAMETER)
{
ULONG_PTR wow;
if (!NtQueryInformationProcess( process, ProcessWow64Information, &wow, sizeof(wow), NULL ) && wow)
status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process,
(void *)0x7ffe1000, NULL, 0, 0, 0, 0, NULL );
}
#endif
if (!status) NtClose( handle ); if (!status) NtClose( handle );
return status; return status;
} }

View file

@ -1616,7 +1616,7 @@ static void load_ntdll_wow64_functions( HMODULE module )
GET_FUNC( RtlpFreezeTimeBias ); GET_FUNC( RtlpFreezeTimeBias );
GET_FUNC( RtlpQueryProcessDebugInformationRemote ); GET_FUNC( RtlpQueryProcessDebugInformationRemote );
#undef GET_FUNC #undef GET_FUNC
pDbgUiRemoteBreakin = (void *)find_named_export( module, exports, "DbgUiRemoteBreakin" );
p__wine_ctrl_routine = (void *)find_named_export( module, exports, "__wine_ctrl_routine" ); p__wine_ctrl_routine = (void *)find_named_export( module, exports, "__wine_ctrl_routine" );
#ifdef _WIN64 #ifdef _WIN64

View file

@ -640,7 +640,7 @@ static void invoke_system_apc( const union apc_call *call, union apc_result *res
(ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg) (ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg)
{ {
/* FIXME: hack for debugging 32-bit process without a 64-bit ntdll */ /* FIXME: hack for debugging 32-bit process without a 64-bit ntdll */
if (is_old_wow64() && func == (void *)0x7ffe1000) func = pDbgUiRemoteBreakin; if (is_wow64()) func = pDbgUiRemoteBreakin;
attr->TotalLength = sizeof(buffer); attr->TotalLength = sizeof(buffer);
attr->Attributes[0].Attribute = PS_ATTRIBUTE_CLIENT_ID; attr->Attributes[0].Attribute = PS_ATTRIBUTE_CLIENT_ID;
attr->Attributes[0].Size = sizeof(id); attr->Attributes[0].Size = sizeof(id);