mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Improved csrss (doesn't crash any more)
Improved kernel debugger code Various minor improvements svn path=/trunk/; revision=1015
This commit is contained in:
parent
012968e3dc
commit
fa81b6d260
24 changed files with 455 additions and 136 deletions
|
@ -33,9 +33,11 @@ typedef struct
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
} CSRSS_CREATE_PROCESS_REQUEST, *PCSRSS_CREATE_PROCESS_REQUEST;
|
} CSRSS_CREATE_PROCESS_REQUEST, *PCSRSS_CREATE_PROCESS_REQUEST;
|
||||||
|
|
||||||
/*
|
BOOL
|
||||||
* lib/ntdll/csr/api.c
|
STDCALL
|
||||||
*/
|
CsrServerInitialization (
|
||||||
NTSTATUS CsrConnectToServer(VOID);
|
ULONG ArgumentCount,
|
||||||
|
PWSTR *ArgumentArray
|
||||||
|
);
|
||||||
|
|
||||||
#endif
|
#endif /* __INCLUDE_CSRSS_CSRSS_H */
|
||||||
|
|
33
reactos/include/ntdll/csr.h
Normal file
33
reactos/include/ntdll/csr.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/* $Id: csr.h,v 1.1 2000/02/27 02:01:24 ekohl Exp $
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __INCLUDE_NTDLL_CSR_H
|
||||||
|
#define __INCLUDE_NTDLL_CSR_H
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
CsrClientCallServer (
|
||||||
|
ULONG Unknown1,
|
||||||
|
ULONG Unknown2,
|
||||||
|
ULONG Unknown3,
|
||||||
|
ULONG Unknown4
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
CsrClientConnectToServer (
|
||||||
|
ULONG Unknown1,
|
||||||
|
ULONG Unknown2,
|
||||||
|
ULONG Unknown3,
|
||||||
|
ULONG Unknown4,
|
||||||
|
ULONG Unknown5,
|
||||||
|
ULONG Unknown6
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif /* __INCLUDE_NTDLL_CSR_H */
|
||||||
|
|
||||||
|
/* EOF */
|
|
@ -1,7 +1,9 @@
|
||||||
/* $Id: rtl.h,v 1.11 2000/02/25 23:57:21 ekohl Exp $
|
/* $Id: rtl.h,v 1.12 2000/02/27 02:01:24 ekohl Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __INCLUDE_NTDLL_RTL_H
|
||||||
|
#define __INCLUDE_NTDLL_RTL_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preliminary data type!!
|
* Preliminary data type!!
|
||||||
|
@ -23,9 +25,6 @@ typedef struct _RTL_USER_PROCESS_INFO
|
||||||
} RTL_USER_PROCESS_INFO, *PRTL_USER_PROCESS_INFO;
|
} RTL_USER_PROCESS_INFO, *PRTL_USER_PROCESS_INFO;
|
||||||
|
|
||||||
|
|
||||||
//VOID WINAPI __RtlInitHeap(PVOID base,
|
|
||||||
// ULONG minsize,
|
|
||||||
// ULONG maxsize);
|
|
||||||
|
|
||||||
#define HEAP_BASE (0xa0000000)
|
#define HEAP_BASE (0xa0000000)
|
||||||
|
|
||||||
|
@ -242,4 +241,6 @@ RtlNormalizeProcessParams (
|
||||||
IN OUT PRTL_USER_PROCESS_PARAMETERS ProcessParameters
|
IN OUT PRTL_USER_PROCESS_PARAMETERS ProcessParameters
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#endif /* __INCLUDE_NTDLL_RTL_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
ULONG DbgService( ULONG Service, PVOID Context1, PVOID Context2 );
|
/*
|
||||||
|
* NOTE: Don't call DbgService()!
|
||||||
|
* It's a ntdll internal function and is NOT exported!
|
||||||
|
*/
|
||||||
|
|
||||||
VOID STDCALL OutputDebugStringA(LPCSTR lpOutputString)
|
VOID STDCALL OutputDebugStringA(LPCSTR lpOutputString)
|
||||||
{
|
{
|
||||||
ANSI_STRING AnsiString;
|
DbgPrint( (PSTR)lpOutputString );
|
||||||
AnsiString.Buffer = lpOutputString;
|
|
||||||
AnsiString.Length = AnsiString.MaximumLength = lstrlenA( lpOutputString );
|
|
||||||
DbgService( 1, &AnsiString, NULL );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STDCALL OutputDebugStringW(LPCWSTR lpOutputString)
|
VOID STDCALL OutputDebugStringW(LPCWSTR lpOutputString)
|
||||||
|
@ -28,7 +28,7 @@ VOID STDCALL OutputDebugStringW(LPCWSTR lpOutputString)
|
||||||
if( UnicodeOutput.Length > 512 )
|
if( UnicodeOutput.Length > 512 )
|
||||||
UnicodeOutput.Length = 512;
|
UnicodeOutput.Length = 512;
|
||||||
if( NT_SUCCESS( RtlUnicodeStringToAnsiString( &AnsiString, &UnicodeOutput, FALSE ) ) )
|
if( NT_SUCCESS( RtlUnicodeStringToAnsiString( &AnsiString, &UnicodeOutput, FALSE ) ) )
|
||||||
DbgService( 1, &AnsiString, NULL );
|
DbgPrint( AnsiString.Buffer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include <kernel32/kernel32.h>
|
|
||||||
|
|
||||||
|
|
||||||
VOID KERNEL32_Init()
|
|
||||||
{
|
|
||||||
DPRINT("KERNEL32_Init()\n");
|
|
||||||
__HeapInit(0, 4*1024*1024, 4*1024*1024);
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
/*
|
/* $Id: dllmain.c,v 1.10 2000/02/27 02:04:06 ekohl Exp $
|
||||||
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/kernel32/misc/dllmain.c
|
* FILE: lib/kernel32/misc/dllmain.c
|
||||||
|
@ -9,10 +10,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ntdll/csr.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <kernel32/proc.h>
|
|
||||||
#include <internal/teb.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <kernel32/kernel32.h>
|
#include <kernel32/kernel32.h>
|
||||||
|
@ -28,44 +28,43 @@ BOOL WINAPI DllMainCRTStartup(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||||
return(DllMain(hDll,dwReason,lpReserved));
|
return(DllMain(hDll,dwReason,lpReserved));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID WINAPI __HeapInit(LPVOID base, ULONG minsize, ULONG maxsize);
|
|
||||||
|
|
||||||
WINBOOL STDCALL DllMain(HANDLE hInst,
|
WINBOOL STDCALL DllMain(HANDLE hInst,
|
||||||
ULONG ul_reason_for_call,
|
ULONG ul_reason_for_call,
|
||||||
LPVOID lpReserved)
|
LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
DPRINT("DllMain(hInst %x, ul_reason_for_call %d)\n",
|
DPRINT("DllMain(hInst %x, ul_reason_for_call %d)\n",
|
||||||
hInst, ul_reason_for_call);
|
hInst, ul_reason_for_call);
|
||||||
|
|
||||||
switch (ul_reason_for_call)
|
switch (ul_reason_for_call)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
DPRINT("DLL_PROCESS_ATTACH\n");
|
DPRINT("DLL_PROCESS_ATTACH\n");
|
||||||
AllocConsole();
|
|
||||||
break;
|
/*
|
||||||
}
|
*
|
||||||
case DLL_THREAD_ATTACH:
|
*/
|
||||||
|
Status = CsrClientConnectToServer(0,0,0,0,0,0);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
// Teb = HeapAlloc(GetProcessHeap(),0,sizeof(NT_TEB));
|
DbgPrint("Failed to connect to csrss.exe: expect trouble\n");
|
||||||
// Teb->Peb = GetCurrentPeb();
|
/* return FALSE; */
|
||||||
// Teb->HardErrorMode = SEM_NOGPFAULTERRORBOX;
|
}
|
||||||
// Teb->dwTlsIndex=0;
|
|
||||||
|
AllocConsole();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
{
|
{
|
||||||
// HeapFree(GetProcessHeap(),0,Teb);
|
DPRINT("DLL_PROCESS_DETACH\n");
|
||||||
HeapDestroy(NtCurrentPeb()->ProcessHeap);
|
HeapDestroy(NtCurrentPeb()->ProcessHeap);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
{
|
|
||||||
// HeapFree(GetProcessHeap(),0,Teb);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: api.c,v 1.2 1999/12/30 01:51:38 dwelch Exp $
|
/* $Id: api.c,v 1.3 2000/02/27 02:05:06 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ntdll/csr.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <csrss/csrss.h>
|
#include <csrss/csrss.h>
|
||||||
|
@ -22,8 +23,12 @@ static HANDLE WindowsApiPort;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
NTSTATUS CsrClientCallServer(PCSRSS_API_REQUEST Request,
|
NTSTATUS
|
||||||
PCSRSS_API_REPLY Reply)
|
STDCALL
|
||||||
|
CsrClientCallServer(PCSRSS_API_REQUEST Request,
|
||||||
|
PCSRSS_API_REPLY Reply,
|
||||||
|
ULONG Unknown3,
|
||||||
|
ULONG Unknown4)
|
||||||
{
|
{
|
||||||
LPCMESSAGE LpcRequest;
|
LPCMESSAGE LpcRequest;
|
||||||
LPCMESSAGE LpcReply;
|
LPCMESSAGE LpcReply;
|
||||||
|
@ -39,7 +44,14 @@ NTSTATUS CsrClientCallServer(PCSRSS_API_REQUEST Request,
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS CsrConnectToServer(VOID)
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
CsrClientConnectToServer(ULONG Unknown1,
|
||||||
|
ULONG Unknown2,
|
||||||
|
ULONG Unknown3,
|
||||||
|
ULONG Unknown4,
|
||||||
|
ULONG Unknown5,
|
||||||
|
ULONG Unknown6)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
UNICODE_STRING PortName;
|
UNICODE_STRING PortName;
|
||||||
|
@ -64,7 +76,8 @@ NTSTATUS CsrConnectToServer(VOID)
|
||||||
|
|
||||||
Request.Type = CSRSS_CONNECT_PROCESS;
|
Request.Type = CSRSS_CONNECT_PROCESS;
|
||||||
Status = CsrClientCallServer(&Request,
|
Status = CsrClientCallServer(&Request,
|
||||||
&Reply);
|
&Reply,
|
||||||
|
0, 0);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
return(Status);
|
return(Status);
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
; $Id: ntdll.def,v 1.41 2000/02/21 22:37:24 ekohl Exp $
|
; $Id: ntdll.def,v 1.42 2000/02/27 02:05:40 ekohl Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
LIBRARY ntdll.dll
|
LIBRARY ntdll.dll
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
|
CsrClientCallServer@16
|
||||||
|
CsrClientConnectToServer@24
|
||||||
DbgBreakPoint
|
DbgBreakPoint
|
||||||
DbgPrint
|
DbgPrint
|
||||||
DbgService
|
|
||||||
DbgUserBreakPoint
|
DbgUserBreakPoint
|
||||||
NlsAnsiCodePage
|
NlsAnsiCodePage
|
||||||
NlsMbCodePageTag
|
NlsMbCodePageTag
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
; $Id: ntdll.edf,v 1.30 2000/02/18 00:48:50 ekohl Exp $
|
; $Id: ntdll.edf,v 1.31 2000/02/27 02:05:40 ekohl Exp $
|
||||||
;
|
;
|
||||||
; ReactOS Operating System
|
; ReactOS Operating System
|
||||||
;
|
;
|
||||||
LIBRARY ntdll.dll
|
LIBRARY ntdll.dll
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
|
CsrClientCallServer=CsrClientCallServer@16
|
||||||
|
CsrClientConnectToServer=CsrClientConnectToServer@24
|
||||||
DbgBreakPoint
|
DbgBreakPoint
|
||||||
DbgPrint
|
DbgPrint
|
||||||
DbgUserBreakPoint
|
DbgUserBreakPoint
|
||||||
|
@ -658,5 +660,3 @@ LdrLoadDll
|
||||||
LdrUnloadDll
|
LdrUnloadDll
|
||||||
LdrAccessResource
|
LdrAccessResource
|
||||||
LdrFindResource_U
|
LdrFindResource_U
|
||||||
;RtlCopyMemory=RtlCopyMemory@12
|
|
||||||
DbgService
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: startup.c,v 1.19 2000/02/25 00:35:06 ekohl Exp $
|
/* $Id: startup.c,v 1.20 2000/02/27 02:05:53 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
DLL LdrDllListHead;
|
DLL LdrDllListHead;
|
||||||
extern unsigned int _image_base__;
|
extern unsigned int _image_base__;
|
||||||
extern HANDLE __ProcessHeap;
|
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
@ -53,7 +52,6 @@ VOID LdrStartup(VOID)
|
||||||
LdrDllListHead.Headers = (PIMAGE_NT_HEADERS)(LdrDllListHead.BaseAddress +
|
LdrDllListHead.Headers = (PIMAGE_NT_HEADERS)(LdrDllListHead.BaseAddress +
|
||||||
PEDosHeader->e_lfanew);
|
PEDosHeader->e_lfanew);
|
||||||
|
|
||||||
|
|
||||||
Peb = (PPEB)(PEB_BASE);
|
Peb = (PPEB)(PEB_BASE);
|
||||||
DPRINT("Peb %x\n", Peb);
|
DPRINT("Peb %x\n", Peb);
|
||||||
ImageBase = Peb->ImageBaseAddress;
|
ImageBase = Peb->ImageBaseAddress;
|
||||||
|
@ -79,30 +77,27 @@ VOID LdrStartup(VOID)
|
||||||
RtlNormalizeProcessParams (Peb->ProcessParameters);
|
RtlNormalizeProcessParams (Peb->ProcessParameters);
|
||||||
|
|
||||||
NTHeaders = (PIMAGE_NT_HEADERS)(ImageBase + PEDosHeader->e_lfanew);
|
NTHeaders = (PIMAGE_NT_HEADERS)(ImageBase + PEDosHeader->e_lfanew);
|
||||||
__ProcessHeap = RtlCreateHeap(0,
|
|
||||||
|
/* create process heap */
|
||||||
|
Peb->ProcessHeap = RtlCreateHeap(0,
|
||||||
(PVOID)HEAP_BASE,
|
(PVOID)HEAP_BASE,
|
||||||
NTHeaders->OptionalHeader.SizeOfHeapCommit,
|
NTHeaders->OptionalHeader.SizeOfHeapCommit,
|
||||||
NTHeaders->OptionalHeader.SizeOfHeapReserve,
|
NTHeaders->OptionalHeader.SizeOfHeapReserve,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
Peb->ProcessHeap = __ProcessHeap;
|
if (Peb->ProcessHeap == 0)
|
||||||
EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL);
|
{
|
||||||
|
DbgPrint("Failed to create process heap\n");
|
||||||
|
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
||||||
|
}
|
||||||
|
|
||||||
|
EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL);
|
||||||
if (EntryPoint == NULL)
|
if (EntryPoint == NULL)
|
||||||
{
|
{
|
||||||
DbgPrint("Failed to initialize image\n");
|
DbgPrint("Failed to initialize image\n");
|
||||||
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Status = CsrConnectToServer();
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DbgPrint("Failed to connect to csrss.exe: expect trouble\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
DbgPrint("Transferring control to image at %x\n",EntryPoint);
|
DbgPrint("Transferring control to image at %x\n",EntryPoint);
|
||||||
Status = EntryPoint(Peb);
|
Status = EntryPoint(Peb);
|
||||||
ZwTerminateProcess(NtCurrentProcess(),Status);
|
ZwTerminateProcess(NtCurrentProcess(),Status);
|
||||||
|
|
|
@ -88,7 +88,6 @@ typedef struct tagHEAP
|
||||||
#define HEAP_DEF_SIZE 0x110000 /* Default heap size = 1Mb + 64Kb */
|
#define HEAP_DEF_SIZE 0x110000 /* Default heap size = 1Mb + 64Kb */
|
||||||
#define HEAP_MIN_BLOCK_SIZE (8+sizeof(ARENA_FREE)) /* Min. heap block size */
|
#define HEAP_MIN_BLOCK_SIZE (8+sizeof(ARENA_FREE)) /* Min. heap block size */
|
||||||
|
|
||||||
HANDLE __ProcessHeap = 0;
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* HEAP_Dump
|
* HEAP_Dump
|
||||||
|
@ -1268,6 +1267,6 @@ BOOL WINAPI RtlValidateHeap(
|
||||||
HANDLE WINAPI RtlGetProcessHeap(VOID)
|
HANDLE WINAPI RtlGetProcessHeap(VOID)
|
||||||
{
|
{
|
||||||
DPRINT("RtlGetProcessHeap()\n");
|
DPRINT("RtlGetProcessHeap()\n");
|
||||||
return (HANDLE) __ProcessHeap;
|
return (HANDLE)NtCurrentPeb()->ProcessHeap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: print.c,v 1.7 2000/02/13 16:05:17 dwelch Exp $
|
/* $Id: print.c,v 1.8 2000/02/27 02:08:33 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -13,10 +13,12 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <internal/kd.h>
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
#if 0
|
||||||
ULONG DbgService (ULONG Service, PVOID Context1, PVOID Context2);
|
ULONG DbgService (ULONG Service, PVOID Context1, PVOID Context2);
|
||||||
__asm__ ("\n\t.global _DbgService\n\t"
|
__asm__ ("\n\t.global _DbgService\n\t"
|
||||||
"_DbgService:\n\t"
|
"_DbgService:\n\t"
|
||||||
|
@ -25,6 +27,13 @@ __asm__ ("\n\t.global _DbgService\n\t"
|
||||||
"mov 12(%esp), %edx\n\t"
|
"mov 12(%esp), %edx\n\t"
|
||||||
"int $0x2D\n\t"
|
"int $0x2D\n\t"
|
||||||
"ret\n\t");
|
"ret\n\t");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: DON'T CHANGE THIS FUNCTION!!!
|
||||||
|
* DON'T CALL HalDisplayString OR SOMETING ELSE!!!
|
||||||
|
* You'll only break the serial/bochs debugging feature!!!
|
||||||
|
*/
|
||||||
|
|
||||||
ULONG DbgPrint(PCH Format, ...)
|
ULONG DbgPrint(PCH Format, ...)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +49,7 @@ ULONG DbgPrint(PCH Format, ...)
|
||||||
DebugString.Length = vsprintf (Buffer, Format, ap);
|
DebugString.Length = vsprintf (Buffer, Format, ap);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
HalDisplayString(Buffer);
|
KdpPrintString (&DebugString);
|
||||||
|
|
||||||
return (ULONG)DebugString.Length;
|
return (ULONG)DebugString.Length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: kdbg.c,v 1.5 2000/02/26 22:41:35 ea Exp $
|
/* $Id: kdbg.c,v 1.6 2000/02/27 02:08:53 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
#define SR_MCR_DTR 0x01
|
#define SR_MCR_DTR 0x01
|
||||||
#define SR_MCR_RTS 0x02
|
#define SR_MCR_RTS 0x02
|
||||||
#define SER_LSR(x) ((x)+5)
|
#define SER_LSR(x) ((x)+5)
|
||||||
|
#define SR_LSR_DR 0x01
|
||||||
#define SR_LSR_TBE 0x20
|
#define SR_LSR_TBE 0x20
|
||||||
#define SER_MSR(x) ((x)+6)
|
#define SER_MSR(x) ((x)+6)
|
||||||
#define SR_MSR_CTS 0x10
|
#define SR_MSR_CTS 0x10
|
||||||
|
@ -264,7 +265,10 @@ KdPortGetByte (
|
||||||
if (PortInitialized == FALSE)
|
if (PortInitialized == FALSE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return (BYTE) 0;
|
if ((READ_PORT_UCHAR (SER_LSR(PortBase)) & SR_LSR_DR))
|
||||||
|
return (BYTE)READ_PORT_UCHAR (SER_RBR(PortBase));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,7 +279,13 @@ KdPortPollByte (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return (BYTE) 0;
|
if (PortInitialized == FALSE)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
while ((READ_PORT_UCHAR (SER_LSR(PortBase)) & SR_LSR_DR) == 0)
|
||||||
|
;
|
||||||
|
|
||||||
|
return (BYTE)READ_PORT_UCHAR (SER_RBR(PortBase));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: kdebug.c,v 1.5 2000/02/26 22:41:35 ea Exp $
|
/* $Id: kdebug.c,v 1.6 2000/02/27 02:09:40 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -48,15 +48,8 @@
|
||||||
|
|
||||||
/* VARIABLES ***************************************************************/
|
/* VARIABLES ***************************************************************/
|
||||||
|
|
||||||
//BYTE STDCALL KdPortPollByte(VOID);
|
BOOLEAN KdDebuggerEnabled = FALSE; /* EXPORTED */
|
||||||
|
BOOLEAN KdDebuggerNotPresent = TRUE; /* EXPORTED */
|
||||||
/* DATA */
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
KdDebuggerEnabled = FALSE;
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
KdDebuggerNotPresent = TRUE;
|
|
||||||
|
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS ********************************************************/
|
/* PRIVATE FUNCTIONS ********************************************************/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: service.c,v 1.1 2000/01/17 21:02:06 ekohl Exp $
|
/* $Id: service.c,v 1.2 2000/02/27 02:09:40 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -15,6 +15,12 @@
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: DON'T CHANGE THIS FUNCTION!!!
|
||||||
|
* DON'T CALL HalDisplayString OR SOMETING ELSE!!!
|
||||||
|
* You'll only break the serial/bochs debugging feature!!!
|
||||||
|
*/
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
KdpServiceDispatcher (
|
KdpServiceDispatcher (
|
||||||
ULONG Service,
|
ULONG Service,
|
||||||
|
@ -27,7 +33,6 @@ KdpServiceDispatcher (
|
||||||
{
|
{
|
||||||
case 1: /* DbgPrint */
|
case 1: /* DbgPrint */
|
||||||
Result = KdpPrintString ((PANSI_STRING)Context1);
|
Result = KdpPrintString ((PANSI_STRING)Context1);
|
||||||
// HalDisplayString (((PANSI_STRING)Context1)->Buffer);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: main.c,v 1.36 2000/02/26 22:41:35 ea Exp $
|
/* $Id: main.c,v 1.37 2000/02/27 02:10:09 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -17,7 +17,6 @@
|
||||||
#include <internal/mm.h>
|
#include <internal/mm.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <internal/string.h>
|
#include <internal/string.h>
|
||||||
#include <internal/symbol.h>
|
|
||||||
#include <internal/module.h>
|
#include <internal/module.h>
|
||||||
#include <internal/ldr.h>
|
#include <internal/ldr.h>
|
||||||
#include <internal/ex.h>
|
#include <internal/ex.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.def,v 1.46 2000/02/26 22:41:34 ea Exp $
|
; $Id: ntoskrnl.def,v 1.47 2000/02/27 02:08:12 ekohl Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -155,6 +155,9 @@ IoStartNextPacket
|
||||||
IoStartNextPacketByKey
|
IoStartNextPacketByKey
|
||||||
IoStartTimer
|
IoStartTimer
|
||||||
IoStopTimer
|
IoStopTimer
|
||||||
|
KdDebuggerEnabled DATA
|
||||||
|
KdDebuggerNotPresent DATA
|
||||||
|
KdPollBreakIn@0
|
||||||
KeAddSystemServiceTable
|
KeAddSystemServiceTable
|
||||||
KeBugCheck
|
KeBugCheck
|
||||||
KeBugCheckEx
|
KeBugCheckEx
|
||||||
|
@ -236,6 +239,12 @@ READ_REGISTER_USHORT
|
||||||
READ_REGISTER_BUFFER_UCHAR
|
READ_REGISTER_BUFFER_UCHAR
|
||||||
READ_REGISTER_BUFFER_ULONG
|
READ_REGISTER_BUFFER_ULONG
|
||||||
READ_REGISTER_BUFFER_USHORT
|
READ_REGISTER_BUFFER_USHORT
|
||||||
|
;RtlAbsoluteToSelfRelativeSD
|
||||||
|
;RtlAddAccessAllowedAce
|
||||||
|
;RtlAddAce
|
||||||
|
;RtlAddAtomToAtomTable
|
||||||
|
;RtlAllocateAndInitializeSid
|
||||||
|
;RtlAllocateHeap
|
||||||
RtlAnsiCharToUnicodeChar@4
|
RtlAnsiCharToUnicodeChar@4
|
||||||
RtlAnsiStringToUnicodeSize@4
|
RtlAnsiStringToUnicodeSize@4
|
||||||
RtlAnsiStringToUnicodeString@12
|
RtlAnsiStringToUnicodeString@12
|
||||||
|
@ -243,21 +252,56 @@ RtlAppendAsciizToString@8
|
||||||
RtlAppendStringToString@8
|
RtlAppendStringToString@8
|
||||||
RtlAppendUnicodeStringToString@8
|
RtlAppendUnicodeStringToString@8
|
||||||
RtlAppendUnicodeToString@8
|
RtlAppendUnicodeToString@8
|
||||||
|
;RtlAreAllAccessesGranted
|
||||||
|
;RtlAreAnyAccessesGranted
|
||||||
|
;RtlAreBitsClear
|
||||||
|
;RtlAreBitsSet
|
||||||
|
;RtlAssert
|
||||||
|
;RtlCaptureStackBackTrace
|
||||||
RtlCharToInteger@12
|
RtlCharToInteger@12
|
||||||
|
;RtlCheckRegistryKey
|
||||||
|
;RtlClearAllBits
|
||||||
|
;RtlClearBits
|
||||||
RtlCompareMemory@12
|
RtlCompareMemory@12
|
||||||
|
RtlCompareMemoryUlong@12
|
||||||
RtlCompareString@12
|
RtlCompareString@12
|
||||||
RtlCompareUnicodeString@12
|
RtlCompareUnicodeString@12
|
||||||
|
;RtlCompressBuffer
|
||||||
|
;RtlCompressChunks
|
||||||
RtlConvertLongToLargeInteger@4
|
RtlConvertLongToLargeInteger@4
|
||||||
|
;RtlConvertSidToUnicodeString
|
||||||
RtlConvertUlongToLargeInteger@4
|
RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyLuid@8
|
RtlCopyLuid@8
|
||||||
|
RtlCopySid@12
|
||||||
RtlCopyString@8
|
RtlCopyString@8
|
||||||
RtlCopyUnicodeString@8
|
RtlCopyUnicodeString@8
|
||||||
|
;RtlCreateAcl
|
||||||
|
;RtlCreateAtomTable
|
||||||
|
;RtlCreateHeap
|
||||||
|
;RtlCreateRegistryKey
|
||||||
|
;RtlCreateSecurityDescriptor
|
||||||
RtlCreateUnicodeString@8
|
RtlCreateUnicodeString@8
|
||||||
|
;RtlCustomCPToUnicodeN
|
||||||
|
;RtlDecompressBuffer
|
||||||
|
;RtlDecompressChunks
|
||||||
|
;RtlDecompressFragment
|
||||||
|
;RtlDelete
|
||||||
|
;RtlDeleteAtomFromAtomTable
|
||||||
|
;RtlDeleteElementGenericTable
|
||||||
|
;RtlDeleteNoSplay
|
||||||
|
;RtlDeleteRegisterValue
|
||||||
|
;RtlDescribeChunk
|
||||||
|
;RtlDestroyAtomTable
|
||||||
|
;RtlDestroyHeap
|
||||||
RtlDowncaseUnicodeString@12
|
RtlDowncaseUnicodeString@12
|
||||||
|
;RtlEmptyAtomTable
|
||||||
RtlEnlargedIntegerMultiply@8
|
RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide@16
|
RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply@8
|
RtlEnlargedUnsignedMultiply@8
|
||||||
|
;RtlEnumerateGenericTable
|
||||||
|
;RtlEnumerateGenericTableWithoutSplaying
|
||||||
RtlEqualLuid@8
|
RtlEqualLuid@8
|
||||||
|
RtlEqualSid@8
|
||||||
RtlEqualString@12
|
RtlEqualString@12
|
||||||
RtlEqualUnicodeString@12
|
RtlEqualUnicodeString@12
|
||||||
RtlExtendedIntegerMultiply@12
|
RtlExtendedIntegerMultiply@12
|
||||||
|
@ -265,15 +309,43 @@ RtlExtendedLargeIntegerDivide@16
|
||||||
RtlExtendedMagicDivide@20
|
RtlExtendedMagicDivide@20
|
||||||
RtlFillMemory@12
|
RtlFillMemory@12
|
||||||
RtlFillMemoryUlong@12
|
RtlFillMemoryUlong@12
|
||||||
|
;RtlFindClearBits
|
||||||
|
;RtlFindClearBitsAndSet
|
||||||
|
;RtlFindFirstRunClear
|
||||||
|
;RtlFindFirstRunSet
|
||||||
|
;RtlFindLongestRunClear
|
||||||
|
;RtlFindLongestRunSet
|
||||||
|
;RtlFindMessage
|
||||||
|
;RtlFindSetBits
|
||||||
|
;RtlFindSetBitsAndClear
|
||||||
|
;RtlFindUnicodePrefix
|
||||||
|
;RtlFormatCurrentUserKeyPath
|
||||||
RtlFreeAnsiString@4
|
RtlFreeAnsiString@4
|
||||||
|
;RtlFreeHeap
|
||||||
RtlFreeOemString@4
|
RtlFreeOemString@4
|
||||||
RtlFreeUnicodeString@4
|
RtlFreeUnicodeString@4
|
||||||
|
;RtlGenerate8dot3Name
|
||||||
|
;RtlGetCallersAddress
|
||||||
|
;RtlGetCompressionWorkSpaceSize
|
||||||
|
;RtlGetDaclSecurityDescriptor
|
||||||
RtlGetDefaultCodePage@8
|
RtlGetDefaultCodePage@8
|
||||||
|
;RtlGetElementGenericTable
|
||||||
|
;RtlGetGroupSecurityDescriptor
|
||||||
|
;RtlGetOwnerSecurityDescriptor
|
||||||
|
;RtlImageNtHeader@4
|
||||||
RtlInitAnsiString@8
|
RtlInitAnsiString@8
|
||||||
|
;RtlInitCodePageTable
|
||||||
RtlInitString@8
|
RtlInitString@8
|
||||||
RtlInitUnicodeString@8
|
RtlInitUnicodeString@8
|
||||||
|
;RtlInitializeBitmap
|
||||||
|
;RtlInitializeGenericTable
|
||||||
|
RtlInitializeSid@12
|
||||||
|
;RtlInitializeUnicodePrefix
|
||||||
|
;RtlInsertElementGenericTable
|
||||||
|
;RtlInsertUnicodePrefix
|
||||||
RtlIntegerToChar@16
|
RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString@12
|
||||||
|
;RtlIsNamelegalDOS8Dot3
|
||||||
RtlLargeIntegerAdd@16
|
RtlLargeIntegerAdd@16
|
||||||
RtlLargeIntegerArithmeticShift@12
|
RtlLargeIntegerArithmeticShift@12
|
||||||
RtlLargeIntegerDivide@20
|
RtlLargeIntegerDivide@20
|
||||||
|
@ -281,34 +353,76 @@ RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft@12
|
RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight@12
|
RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract@16
|
RtlLargeIntegerSubtract@16
|
||||||
|
RtlLengthRequiredSid@4
|
||||||
|
;RtlLengthRequiredSecurityDescriptor
|
||||||
|
RtlLengthSid@4
|
||||||
|
;RtlLookupAtomInAtomTable
|
||||||
|
;RtlLookupElementGenericTable
|
||||||
|
;RtlMapGenericMask
|
||||||
RtlMoveMemory@12
|
RtlMoveMemory@12
|
||||||
RtlMultiByteToUnicodeN@20
|
RtlMultiByteToUnicodeN@20
|
||||||
RtlMultiByteToUnicodeSize@12
|
RtlMultiByteToUnicodeSize@12
|
||||||
|
;RtlNextUnicodePrefix
|
||||||
|
;RtlNtStatusToDosError
|
||||||
|
;RtlNtStatusToDosErrorNoTeb
|
||||||
|
;RtlNumberGenericTableElements
|
||||||
|
;RtlNumberOfClearBits
|
||||||
|
;RtlNumberOfSetBits
|
||||||
|
;RtlOemStringToCountedUnicodeString
|
||||||
RtlOemStringToUnicodeSize@4
|
RtlOemStringToUnicodeSize@4
|
||||||
RtlOemStringToUnicodeString@12
|
RtlOemStringToUnicodeString@12
|
||||||
RtlOemToUnicodeN@20
|
RtlOemToUnicodeN@20
|
||||||
|
;RtlPinAtomInAtomTable
|
||||||
|
;RtlPrefixString
|
||||||
|
;RtlPrefixUnicodeString
|
||||||
|
;RtlQueryAtominAtomTable
|
||||||
|
;RtlQueryRegistryValues
|
||||||
|
;RtlQueryTimeZoneInformation
|
||||||
|
;RtlRaiseException
|
||||||
|
;RtlRandom
|
||||||
|
;RtlRemoveUnicodePrefix
|
||||||
|
;RtlReserveChunk
|
||||||
RtlSecondsSince1970ToTime@8
|
RtlSecondsSince1970ToTime@8
|
||||||
RtlSecondsSince1980ToTime@8
|
RtlSecondsSince1980ToTime@8
|
||||||
|
;RtlSetAllBits
|
||||||
|
;RtlSetBits
|
||||||
|
;RtlSetDaclSecurityDescriptor
|
||||||
|
;RtlSetGroupSecurityDescriptor
|
||||||
|
;RtlSetOwnerSecurityDescriptor
|
||||||
|
;RtlSetSaclSecurityDescriptor
|
||||||
|
;RtlSetTimeZoneInformation
|
||||||
|
;RtlSplay
|
||||||
|
RtlSubAuthorityCountSid@4
|
||||||
|
RtlSubAuthoritySid@8
|
||||||
RtlTimeFieldsToTime@8
|
RtlTimeFieldsToTime@8
|
||||||
RtlTimeToSecondsSince1970@8
|
RtlTimeToSecondsSince1970@8
|
||||||
RtlTimeToSecondsSince1980@8
|
RtlTimeToSecondsSince1980@8
|
||||||
RtlTimeToTimeFields@8
|
RtlTimeToTimeFields@8
|
||||||
RtlUnicodeStringToAnsiSize@4
|
RtlUnicodeStringToAnsiSize@4
|
||||||
RtlUnicodeStringToAnsiString@12
|
RtlUnicodeStringToAnsiString@12
|
||||||
|
;RtlUnicodeStringToCountedOemString
|
||||||
RtlUnicodeStringToInteger@12
|
RtlUnicodeStringToInteger@12
|
||||||
RtlUnicodeStringToOemSize@4
|
RtlUnicodeStringToOemSize@4
|
||||||
RtlUnicodeStringToOemString@12
|
RtlUnicodeStringToOemString@12
|
||||||
|
;RtlUnicodeToCustomCPN
|
||||||
RtlUnicodeToMultiByteN@20
|
RtlUnicodeToMultiByteN@20
|
||||||
RtlUnicodeToMultiByteSize@12
|
RtlUnicodeToMultiByteSize@12
|
||||||
RtlUnicodeToOemN@20
|
RtlUnicodeToOemN@20
|
||||||
|
;RtlUnwind
|
||||||
RtlUpcaseUnicodeChar@4
|
RtlUpcaseUnicodeChar@4
|
||||||
RtlUpcaseUnicodeString@12
|
RtlUpcaseUnicodeString@12
|
||||||
RtlUpcaseUnicodeStringToAnsiString@12
|
RtlUpcaseUnicodeStringToAnsiString@12
|
||||||
|
;RtlUpcaseUnicodeStringToCountedOemString
|
||||||
RtlUpcaseUnicodeStringToOemString@12
|
RtlUpcaseUnicodeStringToOemString@12
|
||||||
|
;RtlUpcaseUnicodeToCustomCPN
|
||||||
RtlUpcaseUnicodeToMultiByteN@20
|
RtlUpcaseUnicodeToMultiByteN@20
|
||||||
RtlUpcaseUnicodeToOemN@20
|
RtlUpcaseUnicodeToOemN@20
|
||||||
RtlUpperChar@4
|
RtlUpperChar@4
|
||||||
RtlUpperString@8
|
RtlUpperString@8
|
||||||
|
;RtlValidSecurityDescriptor
|
||||||
|
RtlValidSid@4
|
||||||
|
;RtlWriteRegistryValue
|
||||||
|
;RtlZeroHeap
|
||||||
RtlZeroMemory@8
|
RtlZeroMemory@8
|
||||||
RtlxAnsiStringToUnicodeSize@4
|
RtlxAnsiStringToUnicodeSize@4
|
||||||
RtlxOemStringToUnicodeSize@4
|
RtlxOemStringToUnicodeSize@4
|
||||||
|
@ -539,7 +653,6 @@ HalSetRealTimeClock
|
||||||
;IoSetPartitionInformation
|
;IoSetPartitionInformation
|
||||||
;IoWritePartitionTable
|
;IoWritePartitionTable
|
||||||
KdComPortInUse DATA
|
KdComPortInUse DATA
|
||||||
KdPollBreakIn@0
|
|
||||||
KdPortGetByte@0
|
KdPortGetByte@0
|
||||||
KdPortInitialize@12
|
KdPortInitialize@12
|
||||||
KdPortPollByte@0
|
KdPortPollByte@0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.edf,v 1.33 2000/02/26 22:41:34 ea Exp $
|
; $Id: ntoskrnl.edf,v 1.34 2000/02/27 02:08:12 ekohl Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -155,6 +155,9 @@ IoStartNextPacket
|
||||||
IoStartNextPacketByKey
|
IoStartNextPacketByKey
|
||||||
IoStartTimer
|
IoStartTimer
|
||||||
IoStopTimer
|
IoStopTimer
|
||||||
|
KdDebuggerEnabled DATA
|
||||||
|
KdDebuggerNotPresent DATA
|
||||||
|
KdPollBreakIn=KdPollBreakIn@0
|
||||||
KeAddSystemServiceTable
|
KeAddSystemServiceTable
|
||||||
KeBugCheck
|
KeBugCheck
|
||||||
KeBugCheckEx
|
KeBugCheckEx
|
||||||
|
@ -245,11 +248,13 @@ RtlAppendUnicodeStringToString=RtlAppendUnicodeStringToString@8
|
||||||
RtlAppendUnicodeToString=RtlAppendUnicodeToString@8
|
RtlAppendUnicodeToString=RtlAppendUnicodeToString@8
|
||||||
RtlCharToInteger=RtlCharToInteger@12
|
RtlCharToInteger=RtlCharToInteger@12
|
||||||
RtlCompareMemory=RtlCompareMemory@12
|
RtlCompareMemory=RtlCompareMemory@12
|
||||||
|
RtlCompareMemoryUlong=RtlCompareMemoryUlong@12
|
||||||
RtlCompareString=RtlCompareString@12
|
RtlCompareString=RtlCompareString@12
|
||||||
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
RtlCompareUnicodeString=RtlCompareUnicodeString@12
|
||||||
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
|
RtlConvertLongToLargeInteger=RtlConvertLongToLargeInteger@4
|
||||||
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
|
RtlConvertUlongToLargeInteger=RtlConvertUlongToLargeInteger@4
|
||||||
RtlCopyLuid=RtlCopyLuid@8
|
RtlCopyLuid=RtlCopyLuid@8
|
||||||
|
RtlCopySid=RtlCopySid@12
|
||||||
RtlCopyString=RtlCopyString@8
|
RtlCopyString=RtlCopyString@8
|
||||||
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
RtlCopyUnicodeString=RtlCopyUnicodeString@8
|
||||||
RtlCreateUnicodeString=RtlCreateUnicodeString@8
|
RtlCreateUnicodeString=RtlCreateUnicodeString@8
|
||||||
|
@ -258,6 +263,7 @@ RtlEnlargedIntegerMultiply=RtlEnlargedIntegerMultiply@8
|
||||||
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
|
RtlEnlargedUnsignedDivide=RtlEnlargedUnsignedDivide@16
|
||||||
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
|
RtlEnlargedUnsignedMultiply=RtlEnlargedUnsignedMultiply@8
|
||||||
RtlEqualLuid=RtlEqualLuid@8
|
RtlEqualLuid=RtlEqualLuid@8
|
||||||
|
RtlEqualSid=RtlEqualSid@8
|
||||||
RtlEqualString=RtlEqualString@12
|
RtlEqualString=RtlEqualString@12
|
||||||
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
RtlEqualUnicodeString=RtlEqualUnicodeString@12
|
||||||
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
|
RtlExtendedIntegerMultiply=RtlExtendedIntegerMultiply@12
|
||||||
|
@ -269,9 +275,11 @@ RtlFreeAnsiString=RtlFreeAnsiString@4
|
||||||
RtlFreeOemString=RtlFreeOemString@4
|
RtlFreeOemString=RtlFreeOemString@4
|
||||||
RtlFreeUnicodeString=RtlFreeUnicodeString@4
|
RtlFreeUnicodeString=RtlFreeUnicodeString@4
|
||||||
RtlGetDefaultCodePage=RtlGetDefaultCodePage@8
|
RtlGetDefaultCodePage=RtlGetDefaultCodePage@8
|
||||||
|
;RtlImageNtHeader=RtlImageNtHeader@4
|
||||||
RtlInitAnsiString=RtlInitAnsiString@8
|
RtlInitAnsiString=RtlInitAnsiString@8
|
||||||
RtlInitString=RtlInitString@8
|
RtlInitString=RtlInitString@8
|
||||||
RtlInitUnicodeString=RtlInitUnicodeString@8
|
RtlInitUnicodeString=RtlInitUnicodeString@8
|
||||||
|
RtlInitializeSid=RtlInitializeSid@12
|
||||||
RtlIntegerToChar=RtlIntegerToChar@16
|
RtlIntegerToChar=RtlIntegerToChar@16
|
||||||
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
RtlIntegerToUnicodeString=RtlIntegerToUnicodeString@12
|
||||||
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
|
RtlLargeIntegerAdd=RtlLargeIntegerAdd@16
|
||||||
|
@ -281,6 +289,8 @@ RtlLargeIntegerNegate=RtlLargeIntegerNegate@8
|
||||||
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
|
RtlLargeIntegerShiftLeft=RtlLargeIntegerShiftLeft@12
|
||||||
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
|
RtlLargeIntegerShiftRight=RtlLargeIntegerShiftRight@12
|
||||||
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
|
RtlLargeIntegerSubtract=RtlLargeIntegerSubtract@16
|
||||||
|
RtlLengthRequiredSid=RtlLengthRequiredSid@4
|
||||||
|
RtlLengthSid=RtlLengthSid@4
|
||||||
RtlMoveMemory=RtlMoveMemory@12
|
RtlMoveMemory=RtlMoveMemory@12
|
||||||
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
|
RtlMultiByteToUnicodeN=RtlMultiByteToUnicodeN@20
|
||||||
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
|
RtlMultiByteToUnicodeSize=RtlMultiByteToUnicodeSize@12
|
||||||
|
@ -288,6 +298,8 @@ RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
|
||||||
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
|
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
|
||||||
RtlSecondsSince1970ToTime=RtlSecondsSince1970ToTime@8
|
RtlSecondsSince1970ToTime=RtlSecondsSince1970ToTime@8
|
||||||
RtlSecondsSince1980ToTime=RtlSecondsSince1980ToTime@8
|
RtlSecondsSince1980ToTime=RtlSecondsSince1980ToTime@8
|
||||||
|
RtlSubAuthorityCountSid=RtlSubAuthorityCountSid@4
|
||||||
|
RtlSubAuthoritySid=RtlSubAuthoritySid@8
|
||||||
RtlTimeFieldsToTime=RtlTimeFieldsToTime@8
|
RtlTimeFieldsToTime=RtlTimeFieldsToTime@8
|
||||||
RtlTimeToSecondsSince1970=RtlTimeToSecondsSince1970@8
|
RtlTimeToSecondsSince1970=RtlTimeToSecondsSince1970@8
|
||||||
RtlTimeToSecondsSince1980=RtlTimeToSecondsSince1980@8
|
RtlTimeToSecondsSince1980=RtlTimeToSecondsSince1980@8
|
||||||
|
@ -307,6 +319,7 @@ RtlUpcaseUnicodeToMultiByteN=RtlUpcaseUnicodeToMultiByteN@20
|
||||||
RtlUpcaseUnicodeToOemN=RtlUpcaseUnicodeToOemN@20
|
RtlUpcaseUnicodeToOemN=RtlUpcaseUnicodeToOemN@20
|
||||||
RtlUpperChar=RtlUpperChar@4
|
RtlUpperChar=RtlUpperChar@4
|
||||||
RtlUpperString=RtlUpperString@8
|
RtlUpperString=RtlUpperString@8
|
||||||
|
RtlValidSid=RtlValidSid@4
|
||||||
RtlZeroMemory=RtlZeroMemory@8
|
RtlZeroMemory=RtlZeroMemory@8
|
||||||
RtlxAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize@4
|
RtlxAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize@4
|
||||||
RtlxOemStringToUnicodeSize=RtlxOemStringToUnicodeSize@4
|
RtlxOemStringToUnicodeSize=RtlxOemStringToUnicodeSize@4
|
||||||
|
@ -537,7 +550,6 @@ HalSetRealTimeClock
|
||||||
;IoSetPartitionInformation
|
;IoSetPartitionInformation
|
||||||
;IoWritePartitionTable
|
;IoWritePartitionTable
|
||||||
KdComPortInUse DATA
|
KdComPortInUse DATA
|
||||||
KdPollBreakIn=KdPollBreakIn@0
|
|
||||||
KdPortGetByte=KdPortGetByte@0
|
KdPortGetByte=KdPortGetByte@0
|
||||||
KdPortInitialize=KdPortInitialize@12
|
KdPortInitialize=KdPortInitialize@12
|
||||||
KdPortPollByte=KdPortPollByte@0
|
KdPortPollByte=KdPortPollByte@0
|
||||||
|
|
|
@ -21,6 +21,8 @@ typedef struct
|
||||||
ULONG ProcessId;
|
ULONG ProcessId;
|
||||||
} CSRSS_PROCESS_DATA, *PCSRSS_PROCESS_DATA;
|
} CSRSS_PROCESS_DATA, *PCSRSS_PROCESS_DATA;
|
||||||
|
|
||||||
|
VOID CsrInitProcessData(VOID);
|
||||||
|
|
||||||
NTSTATUS CsrCreateProcess (PCSRSS_PROCESS_DATA ProcessData,
|
NTSTATUS CsrCreateProcess (PCSRSS_PROCESS_DATA ProcessData,
|
||||||
PCSRSS_API_REQUEST LpcMessage);
|
PCSRSS_API_REQUEST LpcMessage);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: process.c,v 1.4 1999/12/30 01:51:42 dwelch Exp $
|
/* $Id: process.c,v 1.5 2000/02/27 02:12:07 ekohl Exp $
|
||||||
*
|
*
|
||||||
* reactos/subsys/csrss/api/process.c
|
* reactos/subsys/csrss/api/process.c
|
||||||
*
|
*
|
||||||
|
@ -22,13 +22,24 @@ static PCSRSS_PROCESS_DATA ProcessData[256];
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
VOID CsrInitProcessData(VOID)
|
||||||
|
{
|
||||||
|
ULONG i;
|
||||||
|
|
||||||
|
for (i=0; i<256; i++)
|
||||||
|
{
|
||||||
|
ProcessData[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PCSRSS_PROCESS_DATA CsrGetProcessData(ULONG ProcessId)
|
PCSRSS_PROCESS_DATA CsrGetProcessData(ULONG ProcessId)
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
for (i=0; i<NrProcess; i++)
|
for (i=0; i<256/*NrProcess*/; i++)
|
||||||
{
|
{
|
||||||
if (ProcessData[i]->ProcessId == ProcessId)
|
if (ProcessData[i] &&
|
||||||
|
ProcessData[i]->ProcessId == ProcessId)
|
||||||
{
|
{
|
||||||
return(ProcessData[i]);
|
return(ProcessData[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: wapi.c,v 1.2 1999/12/30 01:51:42 dwelch Exp $
|
/* $Id: wapi.c,v 1.3 2000/02/27 02:12:07 ekohl Exp $
|
||||||
*
|
*
|
||||||
* reactos/subsys/csrss/init.c
|
* reactos/subsys/csrss/init.c
|
||||||
*
|
*
|
||||||
|
@ -124,6 +124,8 @@ void Thread_Api(PVOID PortHandle)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CsrInitProcessData();
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
Status = NtListenPort(PortHandle, &Request);
|
Status = NtListenPort(PortHandle, &Request);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: csrss.c,v 1.4 1999/12/30 01:51:41 dwelch Exp $
|
/* $Id: csrss.c,v 1.5 2000/02/27 02:11:54 ekohl Exp $
|
||||||
*
|
*
|
||||||
* csrss.c - Client/Server Runtime subsystem
|
* csrss.c - Client/Server Runtime subsystem
|
||||||
*
|
*
|
||||||
|
@ -32,37 +32,88 @@
|
||||||
* actually does nothing but running).
|
* actually does nothing but running).
|
||||||
*/
|
*/
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ntdll/rtl.h>
|
||||||
|
#include <csrss/csrss.h>
|
||||||
|
|
||||||
BOOL TerminationRequestPending = FALSE;
|
VOID PrintString (char* fmt, ...);
|
||||||
|
|
||||||
BOOL InitializeServer(void);
|
|
||||||
|
|
||||||
|
|
||||||
/* Native process' entry point */
|
/* Native process' entry point */
|
||||||
|
|
||||||
VOID NtProcessStartup(PPEB Peb)
|
VOID NtProcessStartup(PPEB Peb)
|
||||||
{
|
{
|
||||||
|
PRTL_USER_PROCESS_PARAMETERS ProcParams;
|
||||||
|
PWSTR ArgBuffer;
|
||||||
|
PWSTR *argv;
|
||||||
|
ULONG argc = 0;
|
||||||
|
int i = 0;
|
||||||
|
int afterlastspace = 0;
|
||||||
|
|
||||||
DisplayString(L"Client/Server Runtime Subsystem\n");
|
DisplayString(L"Client/Server Runtime Subsystem\n");
|
||||||
|
|
||||||
if (InitializeServer() == TRUE)
|
ProcParams = RtlNormalizeProcessParams (Peb->ProcessParameters);
|
||||||
|
|
||||||
|
argv = (PWSTR *)RtlAllocateHeap (Peb->ProcessHeap,
|
||||||
|
0, 512 * sizeof(PWSTR));
|
||||||
|
ArgBuffer = (PWSTR)RtlAllocateHeap (Peb->ProcessHeap,
|
||||||
|
0,
|
||||||
|
ProcParams->CommandLine.Length + sizeof(WCHAR));
|
||||||
|
memcpy (ArgBuffer,
|
||||||
|
ProcParams->CommandLine.Buffer,
|
||||||
|
ProcParams->CommandLine.Length + sizeof(WCHAR));
|
||||||
|
|
||||||
|
while (ArgBuffer[i])
|
||||||
{
|
{
|
||||||
while (FALSE == TerminationRequestPending)
|
if (ArgBuffer[i] == L' ')
|
||||||
{
|
{
|
||||||
/* Do nothing! Should it
|
argc++;
|
||||||
* be the SbApi port's
|
ArgBuffer[i] = L'\0';
|
||||||
* thread instead?
|
argv[argc-1] = &(ArgBuffer[afterlastspace]);
|
||||||
*/
|
i++;
|
||||||
NtYieldExecution();
|
while (ArgBuffer[i] == L' ')
|
||||||
|
i++;
|
||||||
|
afterlastspace = i;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ArgBuffer[afterlastspace] != L'\0')
|
||||||
|
{
|
||||||
|
argc++;
|
||||||
|
ArgBuffer[i] = L'\0';
|
||||||
|
argv[argc-1] = &(ArgBuffer[afterlastspace]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CsrServerInitialization (argc, argv) == TRUE)
|
||||||
|
{
|
||||||
|
DisplayString( L"CSR: Subsystem initialized.\n" );
|
||||||
|
|
||||||
|
RtlFreeHeap (Peb->ProcessHeap,
|
||||||
|
0, argv);
|
||||||
|
RtlFreeHeap (Peb->ProcessHeap,
|
||||||
|
0,
|
||||||
|
ArgBuffer);
|
||||||
|
|
||||||
|
/* terminate the current thread only */
|
||||||
|
NtTerminateThread( NtCurrentThread(), 0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DisplayString( L"CSR: Subsystem initialization failed.\n" );
|
DisplayString( L"CSR: Subsystem initialization failed.\n" );
|
||||||
|
|
||||||
|
RtlFreeHeap (Peb->ProcessHeap,
|
||||||
|
0, argv);
|
||||||
|
RtlFreeHeap (Peb->ProcessHeap,
|
||||||
|
0,
|
||||||
|
ArgBuffer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tell SM we failed.
|
* Tell SM we failed.
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
NtTerminateProcess( NtCurrentProcess(), 0 );
|
NtTerminateProcess( NtCurrentProcess(), 0 );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: init.c,v 1.4 1999/12/30 01:51:41 dwelch Exp $
|
/* $Id: init.c,v 1.5 2000/02/27 02:11:54 ekohl Exp $
|
||||||
*
|
*
|
||||||
* reactos/subsys/csrss/init.c
|
* reactos/subsys/csrss/init.c
|
||||||
*
|
*
|
||||||
|
@ -23,9 +23,57 @@
|
||||||
*/
|
*/
|
||||||
static HANDLE ApiPortHandle;
|
static HANDLE ApiPortHandle;
|
||||||
|
|
||||||
|
|
||||||
|
HANDLE CsrInitEvent = INVALID_HANDLE_VALUE;
|
||||||
|
HANDLE CsrHeap = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
|
HANDLE CsrObjectDirectory = INVALID_HANDLE_VALUE;
|
||||||
|
HANDLE CsrApiPort = INVALID_HANDLE_VALUE;
|
||||||
|
HANDLE CsrSbApiPort = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
|
UNICODE_STRING CsrDirectoryName;
|
||||||
|
|
||||||
|
|
||||||
|
static NTSTATUS
|
||||||
|
CsrParseCommandLine (
|
||||||
|
ULONG ArgumentCount,
|
||||||
|
PWSTR *ArgumentArray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
OBJECT_ATTRIBUTES Attributes;
|
||||||
|
ANSI_STRING AnsiString;
|
||||||
|
|
||||||
|
ULONG i;
|
||||||
|
|
||||||
|
DbgPrint ("Arguments: %ld\n", ArgumentCount);
|
||||||
|
for (i = 0; i < ArgumentCount; i++)
|
||||||
|
{
|
||||||
|
DbgPrint ("Argument %ld: %S\n", i, ArgumentArray[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* create object directory ('\Windows') */
|
||||||
|
RtlCreateUnicodeString (&CsrDirectoryName,
|
||||||
|
L"\\Windows");
|
||||||
|
|
||||||
|
InitializeObjectAttributes (&Attributes,
|
||||||
|
&CsrDirectoryName,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
Status = NtCreateDirectoryObject(&CsrObjectDirectory,
|
||||||
|
0xF000F,
|
||||||
|
&Attributes);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* NAME
|
* NAME
|
||||||
* InitializeServer
|
* CsrServerInitialization
|
||||||
*
|
*
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
* Create a directory object (\windows) and two named LPC ports:
|
* Create a directory object (\windows) and two named LPC ports:
|
||||||
|
@ -36,12 +84,24 @@ static HANDLE ApiPortHandle;
|
||||||
* RETURN VALUE
|
* RETURN VALUE
|
||||||
* TRUE: Initialization OK; otherwise FALSE.
|
* TRUE: Initialization OK; otherwise FALSE.
|
||||||
*/
|
*/
|
||||||
BOOL InitializeServer(void)
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
CsrServerInitialization (
|
||||||
|
ULONG ArgumentCount,
|
||||||
|
PWSTR *ArgumentArray
|
||||||
|
)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
OBJECT_ATTRIBUTES ObAttributes;
|
OBJECT_ATTRIBUTES ObAttributes;
|
||||||
UNICODE_STRING PortName;
|
UNICODE_STRING PortName;
|
||||||
|
|
||||||
|
Status = CsrParseCommandLine (ArgumentCount, ArgumentArray);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
PrintString("Unable to parse the command line (Status: %x)\n", Status);
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* NEW NAMED PORT: \ApiPort */
|
/* NEW NAMED PORT: \ApiPort */
|
||||||
RtlInitUnicodeString(&PortName, L"\\Windows\\ApiPort");
|
RtlInitUnicodeString(&PortName, L"\\Windows\\ApiPort");
|
||||||
InitializeObjectAttributes(&ObAttributes,
|
InitializeObjectAttributes(&ObAttributes,
|
||||||
|
@ -49,6 +109,7 @@ BOOL InitializeServer(void)
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
Status = NtCreatePort(&ApiPortHandle,
|
Status = NtCreatePort(&ApiPortHandle,
|
||||||
&ObAttributes,
|
&ObAttributes,
|
||||||
260,
|
260,
|
||||||
|
@ -80,5 +141,4 @@ BOOL InitializeServer(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: makefile,v 1.4 1999/12/30 01:51:41 dwelch Exp $
|
# $Id: makefile,v 1.5 2000/02/27 02:11:54 ekohl Exp $
|
||||||
#
|
#
|
||||||
# CSRSS: Client/server runtime subsystem
|
# CSRSS: Client/server runtime subsystem
|
||||||
#
|
#
|
||||||
|
@ -43,6 +43,27 @@ $(TARGET).exe: $(OBJECTS) $(LIBS)
|
||||||
--subsystem native
|
--subsystem native
|
||||||
$(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
|
$(NM) --numeric-sort $(TARGET).exe > $(TARGET).sym
|
||||||
|
|
||||||
|
|
||||||
|
floppy: $(FLOPPY_DIR)/subsys/$(TARGET).exe
|
||||||
|
|
||||||
|
$(FLOPPY_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
|
||||||
|
ifeq ($(DOSCLI),yes)
|
||||||
|
$(CP) $(TARGET).exe $(FLOPPY_DIR)\subsys\$(TARGET).exe
|
||||||
|
else
|
||||||
|
$(CP) $(TARGET).exe $(FLOPPY_DIR)/subsys/$(TARGET).exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
dist: $(DIST_DIR)/subsys/$(TARGET).exe
|
||||||
|
|
||||||
|
$(DIST_DIR)/subsys/$(TARGET).exe: $(TARGET).exe
|
||||||
|
ifeq ($(DOSCLI),yes)
|
||||||
|
$(CP) $(TARGET).exe ..\..\$(DIST_DIR)\subsys\$(TARGET).exe
|
||||||
|
else
|
||||||
|
$(CP) $(TARGET).exe ../../$(DIST_DIR)/subsys/$(TARGET).exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
include ../../rules.mak
|
include ../../rules.mak
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
Loading…
Reference in a new issue