https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63b13ad939df6b869d4c9…
commit 63b13ad939df6b869d4c92b340dfb950459ae3f1
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Mon Feb 11 09:03:15 2019 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Mon Feb 11 09:03:58 2019 +0100
[NTOSKRNL] Simplify object type name printing
---
ntoskrnl/ex/handle.c | 55 +---------------------------------------------------
1 file changed, 1 insertion(+), 54 deletions(-)
diff --git a/ntoskrnl/ex/handle.c b/ntoskrnl/ex/handle.c
index f75f0363f7..76dcbfcff9 100644
--- a/ntoskrnl/ex/handle.c
+++ b/ntoskrnl/ex/handle.c
@@ -1368,60 +1368,7 @@ BOOLEAN ExpKdbgExtHandle(ULONG Argc, PCHAR Argv[])
ObjectHeader = ObpGetHandleObject(TableEntry);
KdbpPrint("%p: Object: %p GrantedAccess: %x Entry: %p\n",
ExHandle.Value, &ObjectHeader->Body, TableEntry->GrantedAccess, TableEntry);
- KdbpPrint("Object: %p Type: (%x) ", &ObjectHeader->Body,
ObjectHeader->Type);
- if (ObjectHeader->Type == IoFileObjectType)
- {
- KdbpPrint("File");
- }
- else if (ObjectHeader->Type == ExEventObjectType)
- {
- KdbpPrint("Event");
- }
- else if (ObjectHeader->Type == ExEventPairObjectType)
- {
- KdbpPrint("EventPair");
- }
- else if (ObjectHeader->Type == ExMutantObjectType)
- {
- KdbpPrint("Mutant");
- }
- else if (ObjectHeader->Type == ExSemaphoreObjectType)
- {
- KdbpPrint("Semaphore");
- }
- else if (ObjectHeader->Type == ExTimerType)
- {
- KdbpPrint("Timer");
- }
- else if (ObjectHeader->Type == ExWindowStationObjectType)
- {
- KdbpPrint("WindowStation");
- }
- else if (ObjectHeader->Type == ExDesktopObjectType)
- {
- KdbpPrint("Desktop");
- }
- else if (ObjectHeader->Type == ObpDirectoryObjectType)
- {
- KdbpPrint("Directory");
- }
- else if (ObjectHeader->Type == CmpKeyObjectType)
- {
- KdbpPrint("Key");
- }
- else if (ObjectHeader->Type == MmSectionObjectType)
- {
- KdbpPrint("Section");
- }
- else if (ObjectHeader->Type == PsThreadType)
- {
- KdbpPrint("Thread");
- }
- else if (ObjectHeader->Type == LpcPortObjectType)
- {
- KdbpPrint("ALPC Port");
- }
- KdbpPrint("\n");
+ KdbpPrint("Object: %p Type: (%x) %wZ\n",
&ObjectHeader->Body, ObjectHeader->Type, &ObjectHeader->Type->Name);
KdbpPrint("\tObjectHeader: %p\n", ObjectHeader);
KdbpPrint("\t\tHandleCount: %u PointerCount: %u\n",
ObjectHeader->HandleCount, ObjectHeader->PointerCount);