- Define NDEBUG only once
- Don't define helper macro in the source
- DPRINT fixes
[NTDLL/LDR]
- More verbose DPRINT for initialization failure

svn path=/trunk/; revision=53072
This commit is contained in:
Thomas Faber 2011-08-05 00:50:51 +00:00
parent 4b7e537cf9
commit 9c2f3b9dec
5 changed files with 14 additions and 8 deletions

View file

@ -1996,9 +1996,11 @@ NTAPI
LdrpInitFailure(NTSTATUS Status)
{
ULONG Response;
PPEB Peb = NtCurrentPeb();
/* Print a debug message */
DPRINT1("LDR: Process initialization failure; NTSTATUS = %08lx\n", Status);
DPRINT1("LDR: Process initialization failure for %wZ; NTSTATUS = %08lx\n",
&Peb->ProcessParameters->ImagePathName, Status);
/* Raise a hard error */
if (!LdrpFatalHardErrorCount)

View file

@ -105,7 +105,7 @@ PCSRSS_PROCESS_DATA WINAPI CsrCreateProcessData(HANDLE ProcessId)
PROCESS_ALL_ACCESS,
&ObjectAttributes,
&ClientId);
DPRINT1("CSR PRocess: %p Handle: %p\n", pProcessData, pProcessData->Process);
DPRINT1("CSR Process: %p Handle: %p\n", pProcessData, pProcessData->Process);
if (!NT_SUCCESS(Status))
{
ProcessData[hash] = pProcessData->next;

View file

@ -12,8 +12,6 @@
#include <srv.h>
#define NDEBUG
#define NDEBUG
#include <debug.h>
@ -181,7 +179,6 @@ CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
if (!NT_SUCCESS(Status)) return Status;
/* Multiply by 1024 entries and round to page size */
#define ROUND_UP(n,size) (((ULONG)(n) + (size - 1)) & ~(size - 1)) // hax
CsrSrvSharedSectionSize = ROUND_UP(Size * 1024, CsrNtSysInfo.PageSize);
DPRINT1("Size: %lx\n", CsrSrvSharedSectionSize);

View file

@ -514,9 +514,12 @@ CsrpCreateHeap (int argc, char ** argv, char ** envp)
Status = CsrSrvCreateSharedSection(Value);
DPRINT1("Status: %lx\n", Status);
ASSERT(Status == STATUS_SUCCESS);
if (Status != STATUS_SUCCESS)
{
DPRINT1("CsrSrvCreateSharedSection failed with status 0x%08lx\n", Status);
ASSERT(FALSE);
}
BasepFakeStaticServerData();
return STATUS_SUCCESS;
}

View file

@ -18,3 +18,7 @@
/* Internal CSRSS Headers */
#include <api.h>
#include <csrplugin.h>
/* Defines */
#define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
#define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l))