Commit a24e330b authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Implement DbgUiConnectToDbg().

parent f7c48da3
......@@ -34,7 +34,7 @@
@ stub DbgPrompt
# @ stub DbgQueryDebugFilterState
# @ stub DbgSetDebugFilterState
@ stub DbgUiConnectToDbg
@ stdcall DbgUiConnectToDbg()
@ stub DbgUiContinue
@ stub DbgUiConvertStateChangeStructure
# @ stub DbgUiDebugActiveProcess
......
......@@ -135,6 +135,22 @@ void WINAPI DbgUiSetThreadDebugObject( HANDLE handle )
}
/***********************************************************************
* DbgUiConnectToDbg (NTDLL.@)
*/
NTSTATUS WINAPI DbgUiConnectToDbg(void)
{
HANDLE handle;
NTSTATUS status;
OBJECT_ATTRIBUTES attr = { sizeof(attr) };
if (DbgUiGetThreadDebugObject()) return STATUS_SUCCESS; /* already connected */
status = NtCreateDebugObject( &handle, DEBUG_ALL_ACCESS, &attr, 0 );
if (!status) DbgUiSetThreadDebugObject( handle );
return status;
}
/***********************************************************************
* DbgUiRemoteBreakin (NTDLL.@)
*/
void WINAPI DbgUiRemoteBreakin( void *arg )
......
......@@ -3020,6 +3020,7 @@ typedef struct _PS_CREATE_INFO
NTSYSAPI void WINAPI DbgBreakPoint(void);
NTSYSAPI NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
NTSYSAPI NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
NTSYSAPI NTSTATUS WINAPI DbgUiConnectToDbg(void);
NTSYSAPI HANDLE WINAPI DbgUiGetThreadDebugObject(void);
NTSYSAPI NTSTATUS WINAPI DbgUiIssueRemoteBreakin(HANDLE);
NTSYSAPI void WINAPI DbgUiRemoteBreakin(void*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment