From 5e5862c7feebd4bcd0e46be404db4a0b1e1fd752 Mon Sep 17 00:00:00 2001 From: David Welch Date: Wed, 14 Mar 2001 16:30:08 +0000 Subject: [PATCH] More dependency fixes svn path=/trunk/; revision=1688 --- reactos/ntoskrnl/Makefile | 9 ++------- reactos/ntoskrnl/Makefile.i386 | 3 ++- reactos/ntoskrnl/ke/i386/thread.c | 14 ++++---------- reactos/ntoskrnl/ps/debug.c | 7 +++++-- reactos/rules.mak | 2 +- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index 4d45ec5af93..c8cb8ec1e73 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.18 2001/03/14 00:21:21 dwelch Exp $ +# $Id: Makefile,v 1.19 2001/03/14 16:30:08 dwelch Exp $ # # ReactOS Operating System # @@ -123,11 +123,6 @@ OBJECTS_MM = \ mm/mpw.o \ mm/pageop.o -OBJECTS_MM_I386 = \ - mm/i386/memsafe.o \ - mm/i386/page.o \ - mm/i386/pfault.o - # I/O Subsystem (Io) OBJECTS_IO = \ io/adapter.o \ @@ -235,7 +230,7 @@ OBJECTS_CM = \ # Debugger Support (Dbg) OBJECTS_DBG = \ - dbg/brkpoint.o \ + dbg/dbgctrl.o \ dbg/errinfo.o \ dbg/print.o diff --git a/reactos/ntoskrnl/Makefile.i386 b/reactos/ntoskrnl/Makefile.i386 index 83fffc3dd82..0d66681b49c 100644 --- a/reactos/ntoskrnl/Makefile.i386 +++ b/reactos/ntoskrnl/Makefile.i386 @@ -16,7 +16,8 @@ OBJECTS_KE_I386 := \ ke/i386/i386-mcount.o \ ke/i386/gdt.o \ ke/i386/idt.o \ - ke/i386/ldt.o + ke/i386/ldt.o \ + ke/i386/brkpoint.o OBJECTS_MM_I386 := \ mm/i386/memsafe.o \ diff --git a/reactos/ntoskrnl/ke/i386/thread.c b/reactos/ntoskrnl/ke/i386/thread.c index fd136f5ae44..b5084641f77 100644 --- a/reactos/ntoskrnl/ke/i386/thread.c +++ b/reactos/ntoskrnl/ke/i386/thread.c @@ -1,8 +1,8 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/x86/thread.c - * PURPOSE: HAL multitasking functions + * FILE: ntoskrnl/ke/i386/thread.c + * PURPOSE: Architecture multitasking functions * PROGRAMMER: David Welch (welch@cwcom.net) * REVISION HISTORY: * 27/06/98: Created @@ -24,9 +24,6 @@ /* GLOBALS ***************************************************************/ static char KiNullLdt[8] = {0,}; -static PETHREAD FirstThread = NULL; - -extern ULONG KeSetBaseGdtSelector(ULONG Entry, PVOID Base); KTSS KiTss; @@ -88,8 +85,6 @@ KeValidateUserContext(PCONTEXT Context) return(STATUS_SUCCESS); } - - NTSTATUS Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context) { @@ -107,8 +102,8 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context) KernelStack[2] = 0; /* EBX */ KernelStack[3] = 0; /* EBP */ KernelStack[4] = (ULONG)PsBeginThreadWithContextInternal; /* EIP */ - memcpy((VOID*)&KernelStack[5], (VOID*)Context, sizeof(CONTEXT)); - Thread->KernelStack = (VOID*)KernelStack; + memcpy((PVOID)&KernelStack[5], (PVOID)Context, sizeof(CONTEXT)); + Thread->KernelStack = (PVOID)KernelStack; return(STATUS_SUCCESS); } @@ -194,7 +189,6 @@ HalInitFirstTask(PETHREAD thread) __asm__("ltr %%ax" : /* no output */ : "a" (TSS_SELECTOR)); - FirstThread = thread; } diff --git a/reactos/ntoskrnl/ps/debug.c b/reactos/ntoskrnl/ps/debug.c index a751514bfba..4b393a60114 100644 --- a/reactos/ntoskrnl/ps/debug.c +++ b/reactos/ntoskrnl/ps/debug.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: debug.c,v 1.1 2000/12/10 23:42:01 dwelch Exp $ +/* $Id: debug.c,v 1.2 2001/03/14 16:30:08 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -119,7 +119,9 @@ VOID KeTrapFrameToContext(PKTRAP_FRAME TrapFrame, * NOTE: In the trap frame which is built on entry to a system * call TrapFrame->Edx will actually hold the address of the * previous TrapFrame. I don't believe leaking this information - * has security implications + * has security implications. Also EDX holds the address of the + * arguments to the system call in progress so it isn't of much + * interest to the debugger. */ Context->Edx = TrapFrame->Edx; Context->Esi = TrapFrame->Esi; @@ -255,6 +257,7 @@ NTSTATUS STDCALL NtGetContextThread (IN HANDLE ThreadHandle, return(AStatus); } memcpy(Context, &KContext, sizeof(CONTEXT)); + ObDereferenceObject(Thread); return(STATUS_SUCCESS); } } diff --git a/reactos/rules.mak b/reactos/rules.mak index f9ae9639369..e312e34bc87 100644 --- a/reactos/rules.mak +++ b/reactos/rules.mak @@ -50,7 +50,7 @@ DOSCLI = yes FLOPPY_DIR = A: # DIST_DIR should be relative from the top of the tree DIST_DIR = dist -DOT := \\. +DOT := \. endif CC = $(PREFIX)gcc