diff --git a/reactos/lib/ntdll/dbg/debug.c b/reactos/lib/ntdll/dbg/debug.c index 393a9f0b9fd..8d3577fadb5 100644 --- a/reactos/lib/ntdll/dbg/debug.c +++ b/reactos/lib/ntdll/dbg/debug.c @@ -1,4 +1,4 @@ -/* $Id: debug.c,v 1.7 2002/11/03 20:01:06 chorns Exp $ +/* $Id: debug.c,v 1.8 2003/03/31 22:32:18 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -169,4 +169,40 @@ 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; + + nErrCode = RtlCreateUserThread + ( + Process, + NULL, + FALSE, + 0, + NULL, + NULL, + (PTHREAD_START_ROUTINE)DbgUiRemoteBreakin, + NULL, + &hThread, + &cidClientId + ); + + if(!NT_SUCCESS(nErrCode)) return nErrCode; + + NtClose(hThread); + + return STATUS_SUCCESS; +} + /* EOF */ diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 258dd55b7b0..fc78d0df2e7 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -1,4 +1,4 @@ -; $Id: ntdll.def,v 1.94 2003/03/26 15:19:28 ekohl Exp $ +; $Id: ntdll.def,v 1.95 2003/03/31 22:32:18 hyperion Exp $ ; ; ReactOS Operating System ; @@ -28,6 +28,8 @@ DbgSsHandleKmApiMsg@8 DbgSsInitialize@16 DbgUiConnectToDbg@0 DbgUiContinue@8 +DbgUiIssueRemoteBreakin@4 +DbgUiRemoteBreakin@0 DbgUiWaitStateChange@8 DbgUserBreakPoint@0 ;KiRaiseUserExceptionDispatcher @@ -388,6 +390,7 @@ RtlEqualSid@8 RtlEqualString@12 RtlEqualUnicodeString@12 RtlEraseUnicodeString@4 +RtlExitUserThread@4 RtlExpandEnvironmentStrings_U@16 ;RtlExtendHeap RtlExtendedIntegerMultiply@12 diff --git a/reactos/lib/ntdll/def/ntdll.edf b/reactos/lib/ntdll/def/ntdll.edf index b46e115e34a..fe584f14991 100644 --- a/reactos/lib/ntdll/def/ntdll.edf +++ b/reactos/lib/ntdll/def/ntdll.edf @@ -1,4 +1,4 @@ -; $Id: ntdll.edf,v 1.83 2003/03/26 15:19:28 ekohl Exp $ +; $Id: ntdll.edf,v 1.84 2003/03/31 22:32:18 hyperion Exp $ ; ; ReactOS Operating System ; @@ -28,6 +28,8 @@ DbgSsHandleKmApiMsg=DbgSsHandleKmApiMsg@8 DbgSsInitialize=DbgSsInitialize@16 DbgUiConnectToDbg=DbgUiConnectToDbg@0 DbgUiContinue=DbgUiContinue@8 +DbgUiIssueRemoteBreakin=DbgUiIssueRemoteBreakin@4 +DbgUiRemoteBreakin=DbgUiRemoteBreakin@0 DbgUiWaitStateChange=DbgUiWaitStateChange@8 DbgUserBreakPoint=DbgUserBreakPoint@0 ;KiRaiseUserExceptionDispatcher @@ -388,6 +390,7 @@ RtlEqualSid=RtlEqualSid@8 RtlEqualString=RtlEqualString@12 RtlEqualUnicodeString=RtlEqualUnicodeString@12 RtlEraseUnicodeString=RtlEraseUnicodeString@4 +RtlExitUserThread=RtlExitUserThread@4 RtlExpandEnvironmentStrings_U=RtlExpandEnvironmentStrings_U@16 ;RtlExtendHeap RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12 diff --git a/reactos/lib/ntdll/rtl/thread.c b/reactos/lib/ntdll/rtl/thread.c index 0bd496cf547..90a882bea13 100644 --- a/reactos/lib/ntdll/rtl/thread.c +++ b/reactos/lib/ntdll/rtl/thread.c @@ -270,4 +270,9 @@ RtlFreeUserThreadStack(HANDLE ProcessHandle, return(Status); } +NTSTATUS STDCALL RtlExitUserThread(NTSTATUS Status) +{ + return NtTerminateThread(NtCurrentThread(), Status); +} + /* EOF */