From 8522c6766e907c2c08f395fb7c862f011c9d2d71 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 22 May 2008 19:31:49 +0000 Subject: [PATCH] Stefan Ginsberg - Remove KiRosPrintAddress export from ntoskrnl_i386.def, and CcRos* apis too. - Make win32k use KeRosDumpStackFrames instead of KiRosPrintAddress. svn path=/trunk/; revision=33646 --- reactos/ntoskrnl/ntoskrnl_i386.def | 3 --- reactos/subsystems/win32/win32k/objects/gdidbg.c | 15 +++++++-------- reactos/subsystems/win32/win32k/objects/gdiobj.c | 8 +------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/reactos/ntoskrnl/ntoskrnl_i386.def b/reactos/ntoskrnl/ntoskrnl_i386.def index 7a413a9d526..7399559269a 100644 --- a/reactos/ntoskrnl/ntoskrnl_i386.def +++ b/reactos/ntoskrnl/ntoskrnl_i386.def @@ -3,9 +3,6 @@ ; ReactOS Operating System ; EXPORTS -CcRosInitializeFileCache@16 -CcRosReleaseFileCache@4 -CcRosTraceCacheMap@8 CcCanIWrite@16 CcCopyRead@24 CcCopyWrite@20 diff --git a/reactos/subsystems/win32/win32k/objects/gdidbg.c b/reactos/subsystems/win32/win32k/objects/gdidbg.c index c32c24e489d..4aef02ac291 100644 --- a/reactos/subsystems/win32/win32k/objects/gdidbg.c +++ b/reactos/subsystems/win32/win32k/objects/gdidbg.c @@ -1,6 +1,6 @@ #ifdef GDI_DEBUG -BOOLEAN STDCALL KiRosPrintAddress(PVOID Address); +NTSYSAPI VOID NTAPI KeRosDumpStackFrames(PULONG, ULONG); NTSYSAPI ULONG NTAPI RtlWalkFrameChain(OUT PVOID *Callers, IN ULONG Count, IN ULONG Flags); static int leak_reported = 0; @@ -79,14 +79,13 @@ done: DbgPrint("Worst GDI Handle leak offenders (out of %i unique locations):\n", n); for (i = 0; i < n && h[i].count > 1; i++) { - int j; + /* Print out the allocation count */ DbgPrint(" %i allocs: ", h[i].count); - for (j = 0; j < GDI_STACK_LEVELS; j++) - { - ULONG Addr = GDIHandleAllocator[h[i].idx][j]; - if (!KiRosPrintAddress((PVOID)Addr)) - DbgPrint("<%X>", Addr); - } + + /* Dump the frames */ + KeRosDumpStackFrames(GDIHandleAllocator[h[i].idx], GDI_STACK_LEVELS); + + /* Print new line for better readability */ DbgPrint("\n"); } if (i < n && h[i].count == 1) diff --git a/reactos/subsystems/win32/win32k/objects/gdiobj.c b/reactos/subsystems/win32/win32k/objects/gdiobj.c index 930dfc3deef..f609e1e3f8c 100644 --- a/reactos/subsystems/win32/win32k/objects/gdiobj.c +++ b/reactos/subsystems/win32/win32k/objects/gdiobj.c @@ -9,15 +9,9 @@ /** INCLUDES ******************************************************************/ #include - #define NDEBUG #include -/* FIXME include right header for KeRosDumpStackFrames */ -VOID NTAPI KeRosDumpStackFrames(PULONG, ULONG); - -//#define GDI_DEBUG - #define GDI_ENTRY_TO_INDEX(ht, e) \ (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY)) #define GDI_HANDLE_GET_ENTRY(HandleTable, h) \ @@ -83,7 +77,7 @@ OBJ_TYPE_INFO ObjTypeInfo[] = static LARGE_INTEGER ShortDelay; /** DEBUGGING *****************************************************************/ - +//#define GDI_DEBUG #include "gdidbg.c" /** INTERNAL FUNCTIONS ********************************************************/