branch update for HEAD-2003050101
[reactos.git] / lib / ntdll / dbg / debug.c
index 9604ded..3fb9950 100644 (file)
@@ -169,4 +169,41 @@ DbgUiWaitStateChange(ULONG Unknown1,
   return STATUS_NOT_IMPLEMENTED;
 }
 
+NTSTATUS STDCALL DbgUiRemoteBreakin(VOID)
+{
+ DbgBreakPoint();
+
+ RtlExitUserThread(0);
+
+ DbgBreakPoint();
+}
+
+NTSTATUS STDCALL DbgUiIssueRemoteBreakin(HANDLE Process)
+{
+ HANDLE hThread;
+ CLIENT_ID cidClientId;
+ NTSTATUS nErrCode;
+ ULONG nStackSize = PAGE_SIZE;
+
+ nErrCode = RtlCreateUserThread
+ (
+  Process,
+  NULL,
+  FALSE,
+  0,
+  &nStackSize,
+  &nStackSize,
+  (PTHREAD_START_ROUTINE)DbgUiRemoteBreakin,
+  NULL,
+  &hThread,
+  &cidClientId
+ );
+
+ if(!NT_SUCCESS(nErrCode)) return nErrCode;
+
+ NtClose(hThread);
+
+ return STATUS_SUCCESS;
+}
+
 /* EOF */