ReactOS  0.4.14-dev-98-gb0d4763
kdb_symbols.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: ntoskrnl/kdbg/kdb_symbols.c
5  * PURPOSE: Getting symbol information...
6  *
7  * PROGRAMMERS: David Welch (welch@cwcom.net)
8  * Colin Finck (colin@reactos.org)
9  */
10 
11 /* INCLUDES *****************************************************************/
12 
13 #include <ntoskrnl.h>
14 
15 #define NDEBUG
16 #include <debug.h>
17 
18 /* GLOBALS ******************************************************************/
19 
21 {
26 }
28 
33 
34 /* FUNCTIONS ****************************************************************/
35 
36 static BOOLEAN
38  IN PLIST_ENTRY current_entry,
39  IN PLIST_ENTRY end_entry,
40  IN PLONG Count,
42  IN LPCWSTR Name,
43  IN INT Index,
44  OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry)
45 {
46  while (current_entry && current_entry != end_entry)
47  {
48  *pLdrEntry = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
49 
50  if ((Address && Address >= (PVOID)(*pLdrEntry)->DllBase && Address < (PVOID)((ULONG_PTR)(*pLdrEntry)->DllBase + (*pLdrEntry)->SizeOfImage)) ||
51  (Name && !_wcsnicmp((*pLdrEntry)->BaseDllName.Buffer, Name, (*pLdrEntry)->BaseDllName.Length / sizeof(WCHAR))) ||
52  (Index >= 0 && (*Count)++ == Index))
53  {
54  return TRUE;
55  }
56 
57  current_entry = current_entry->Flink;
58  }
59 
60  return FALSE;
61 }
62 
75 BOOLEAN
80  OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry)
81 {
82  LONG Count = 0;
84 
85  /* First try to look up the module in the kernel module list. */
88  &Count,
89  Address,
90  Name,
91  Index,
92  pLdrEntry))
93  {
94  return TRUE;
95  }
96 
97  /* That didn't succeed. Try the module list of the current process now. */
99 
100  if(!CurrentProcess || !CurrentProcess->Peb || !CurrentProcess->Peb->Ldr)
101  return FALSE;
102 
103  return KdbpSymSearchModuleList(CurrentProcess->Peb->Ldr->InLoadOrderModuleList.Flink,
104  &CurrentProcess->Peb->Ldr->InLoadOrderModuleList,
105  &Count,
106  Address,
107  Name,
108  Index,
109  pLdrEntry);
110 }
111 
112 PCHAR
113 NTAPI
115  OUT PCHAR Ansi,
116  IN ULONG Length)
117 {
118  PCHAR p;
119  PWCHAR pw;
120  ULONG i;
121 
122  /* Set length and normalize it */
123  i = Unicode->Length / sizeof(WCHAR);
124  i = min(i, Length - 1);
125 
126  /* Set source and destination, and copy */
127  pw = Unicode->Buffer;
128  p = Ansi;
129  while (i--) *p++ = (CHAR)*pw++;
130 
131  /* Null terminate and return */
132  *p = ANSI_NULL;
133  return Ansi;
134 }
135 
147 BOOLEAN
149  IN PVOID Address,
151 {
152  PLDR_DATA_TABLE_ENTRY LdrEntry;
153  ULONG_PTR RelativeAddress;
156  CHAR FileName[256];
157  CHAR FunctionName[256];
158  CHAR ModuleNameAnsi[64];
159 
160  if (!KdbpSymbolsInitialized || !KdbpSymFindModule(Address, NULL, -1, &LdrEntry))
161  return FALSE;
162 
164  ModuleNameAnsi,
165  sizeof(ModuleNameAnsi));
166 
167  RelativeAddress = (ULONG_PTR)Address - (ULONG_PTR)LdrEntry->DllBase;
169  RelativeAddress,
170  &LineNumber,
171  FileName,
172  FunctionName);
173  if (NT_SUCCESS(Status))
174  {
175  DbgPrint("<%s:%x (%s:%d (%s))>",
176  ModuleNameAnsi, RelativeAddress, FileName, LineNumber, FunctionName);
177  }
178  else
179  {
180  DbgPrint("<%s:%x>", ModuleNameAnsi, RelativeAddress);
181  }
182 
183  return TRUE;
184 }
185 
186 
203 NTSTATUS
205  IN PROSSYM_INFO RosSymInfo,
206  IN ULONG_PTR RelativeAddress,
210 {
211  if (!KdbpSymbolsInitialized ||
212  !RosSymInfo ||
213  !RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineNumber, FileName, FunctionName))
214  {
215  return STATUS_UNSUCCESSFUL;
216  }
217 
218  return STATUS_SUCCESS;
219 }
220 
233 static PROSSYM_INFO
236 {
237  PIMAGE_SYMBOL_INFO_CACHE Current;
238  PLIST_ENTRY CurrentEntry;
239  KIRQL Irql;
240 
241  DPRINT("Looking for cached symbol file %wZ\n", FileName);
242 
244 
245  CurrentEntry = SymbolFileListHead.Flink;
246  while (CurrentEntry != (&SymbolFileListHead))
247  {
248  Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
249 
250  DPRINT("Current->FileName %wZ FileName %wZ\n", &Current->FileName, FileName);
251  if (RtlEqualUnicodeString(&Current->FileName, FileName, TRUE))
252  {
253  Current->RefCount++;
255  DPRINT("Found cached file!\n");
256  return Current->RosSymInfo;
257  }
258 
259  CurrentEntry = CurrentEntry->Flink;
260  }
261 
263 
264  DPRINT("Cached file not found!\n");
265  return NULL;
266 }
267 
275 static VOID
278  IN PROSSYM_INFO RosSymInfo)
279 {
280  PIMAGE_SYMBOL_INFO_CACHE CacheEntry;
281  KIRQL Irql;
282 
283  DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo);
284 
285  /* allocate entry */
287  ASSERT(CacheEntry);
288  RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE));
289 
290  /* fill entry */
292  FileName->Length,
293  TAG_KDBS);
294  RtlCopyUnicodeString(&CacheEntry->FileName, FileName);
295  ASSERT(CacheEntry->FileName.Buffer);
296  CacheEntry->RefCount = 1;
297  CacheEntry->RosSymInfo = RosSymInfo;
301 }
302 
313 static VOID
315  IN PROSSYM_INFO RosSymInfo)
316 {
317  PIMAGE_SYMBOL_INFO_CACHE Current;
318  PLIST_ENTRY CurrentEntry;
319  KIRQL Irql;
320 
322 
323  CurrentEntry = SymbolFileListHead.Flink;
324  while (CurrentEntry != (&SymbolFileListHead))
325  {
326  Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
327 
328  if (Current->RosSymInfo == RosSymInfo) /* found */
329  {
330  ASSERT(Current->RefCount > 0);
331  Current->RefCount--;
332  if (Current->RefCount < 1)
333  {
334  RemoveEntryList(&Current->ListEntry);
335  RosSymDelete(Current->RosSymInfo);
336  ExFreePool(Current);
337  }
338 
340  return;
341  }
342 
343  CurrentEntry = CurrentEntry->Flink;
344  }
345 
347  DPRINT1("Warning: Removing unknown symbol file: RosSymInfo = %p\n", RosSymInfo);
348 }
349 
357 static VOID
360  OUT PROSSYM_INFO *RosSymInfo)
361 {
366 
367  /* Allow KDB to break on module load */
368  KdbModuleLoaded(FileName);
369 
370  if (!LoadSymbols)
371  {
372  *RosSymInfo = NULL;
373  return;
374  }
375 
376  /* Try to find cached (already loaded) symbol file */
377  *RosSymInfo = KdbpSymFindCachedFile(FileName);
378  if (*RosSymInfo)
379  {
380  DPRINT("Found cached symbol file %wZ\n", FileName);
381  return;
382  }
383 
384  /* Open the file */
386  FileName,
387  0,
388  NULL,
389  NULL);
390 
391  DPRINT("Attempting to open image: %wZ\n", FileName);
392 
396  &IoStatusBlock,
399  if (!NT_SUCCESS(Status))
400  {
401  DPRINT("Could not open image file: %wZ\n", FileName);
402  return;
403  }
404 
405  DPRINT("Loading symbols from %wZ...\n", FileName);
406 
407  if (!RosSymCreateFromFile(&FileHandle, RosSymInfo))
408  {
409  DPRINT("Failed to load symbols from %wZ\n", FileName);
410  return;
411  }
412 
414 
415  DPRINT("Symbols loaded.\n");
416 
417  /* add file to cache */
418  KdbpSymAddCachedFile(FileName, *RosSymInfo);
419 
420  DPRINT("Installed symbols: %wZ %p\n", FileName, *RosSymInfo);
421 }
422 
423 VOID
425  IN PLDR_DATA_TABLE_ENTRY LdrEntry)
426 {
427  if (!LoadSymbols)
428  {
429  LdrEntry->PatchInformation = NULL;
430  return;
431  }
432 
433  /* Remove symbol info if it already exists */
434  if (LdrEntry->PatchInformation)
435  KdbpSymRemoveCachedFile(LdrEntry->PatchInformation);
436 
437  /* Load new symbol information */
438  if (! RosSymCreateFromMem(LdrEntry->DllBase,
439  LdrEntry->SizeOfImage,
440  (PROSSYM_INFO*)&LdrEntry->PatchInformation))
441  {
442  /* Error loading symbol info, try to load it from file */
443  KdbpSymLoadModuleSymbols(&LdrEntry->FullDllName,
444  (PROSSYM_INFO*)&LdrEntry->PatchInformation);
445 
446  /* It already added symbols to cache */
447  }
448  else
449  {
450  /* Add file to cache */
451  KdbpSymAddCachedFile(&LdrEntry->FullDllName, LdrEntry->PatchInformation);
452  }
453 
454  DPRINT("Installed symbols: %wZ@%p-%p %p\n",
455  &LdrEntry->BaseDllName,
456  LdrEntry->DllBase,
457  (PVOID)(LdrEntry->SizeOfImage + (ULONG_PTR)LdrEntry->DllBase),
458  LdrEntry->PatchInformation);
459 
460 }
461 
462 VOID
463 NTAPI
465  PCH Message,
466  ULONG Length)
467 {
468  /* Nothing here */
469 }
470 
471 
477 VOID
478 NTAPI
480  PKD_DISPATCH_TABLE DispatchTable,
481  ULONG BootPhase)
482 {
483  PCHAR p1, p2;
484  SHORT Found = FALSE;
485  CHAR YesNo;
486  PLDR_DATA_TABLE_ENTRY LdrEntry;
487 
488  DPRINT("KdbSymInit() BootPhase=%d\n", BootPhase);
489 
490  LoadSymbols = FALSE;
491 
492 #if DBG
493  /* Load symbols only if we have 96Mb of RAM or more */
494  if (MmNumberOfPhysicalPages >= 0x6000)
495  LoadSymbols = TRUE;
496 #endif
497 
498  if (BootPhase == 0)
499  {
500  /* Write out the functions that we support for now */
501  DispatchTable->KdpInitRoutine = KdpKdbgInit;
502  DispatchTable->KdpPrintRoutine = KdbDebugPrint;
503 
504  /* Register as a Provider */
505  InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
506 
507  /* Perform actual initialization of symbol module */
508  //NtoskrnlModuleObject->PatchInformation = NULL;
509  //LdrHalModuleObject->PatchInformation = NULL;
510 
513 
514  /* Check the command line for /LOADSYMBOLS, /NOLOADSYMBOLS,
515  * /LOADSYMBOLS={YES|NO}, /NOLOADSYMBOLS={YES|NO} */
518  while('\0' != *p1 && NULL != (p2 = strchr(p1, '/')))
519  {
520  p2++;
521  Found = 0;
522  if (0 == _strnicmp(p2, "LOADSYMBOLS", 11))
523  {
524  Found = +1;
525  p2 += 11;
526  }
527  else if (0 == _strnicmp(p2, "NOLOADSYMBOLS", 13))
528  {
529  Found = -1;
530  p2 += 13;
531  }
532  if (0 != Found)
533  {
534  while (isspace(*p2))
535  {
536  p2++;
537  }
538  if ('=' == *p2)
539  {
540  p2++;
541  while (isspace(*p2))
542  {
543  p2++;
544  }
545  YesNo = toupper(*p2);
546  if ('N' == YesNo || 'F' == YesNo || '0' == YesNo)
547  {
548  Found = -1 * Found;
549  }
550  }
551  LoadSymbols = (0 < Found);
552  }
553  p1 = p2;
554  }
555 
557  }
558  else if (BootPhase == 1)
559  {
560  /* Load symbols for NTOSKRNL.EXE.
561  It is always the first module in PsLoadedModuleList. KeLoaderBlock can't be used here as its content is just temporary. */
562  LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
563  KdbSymProcessSymbols(LdrEntry);
564 
565  /* Also load them for HAL.DLL. */
566  LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink->Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
567  KdbSymProcessSymbols(LdrEntry);
568 
570  }
571 }
572 
573 /* EOF */
static VOID KdbpSymAddCachedFile(IN PUNICODE_STRING FileName, IN PROSSYM_INFO RosSymInfo)
Add a symbol file to the cache.
Definition: kdb_symbols.c:276
#define FILE_READ_ACCESS
Definition: nt_native.h:610
signed char * PCHAR
Definition: retypes.h:7
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
BOOLEAN KdbpSymbolsInitialized
Definition: kdb_symbols.c:32
#define IN
Definition: typedefs.h:38
#define isspace(c)
Definition: acclib.h:69
VOID RosSymInitKernelMode(VOID)
Definition: initkm.c:32
#define TRUE
Definition: types.h:120
VOID NTAPI KdpKdbgInit(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase)
Definition: kdbg.c:21
static BOOLEAN KdbpSymSearchModuleList(IN PLIST_ENTRY current_entry, IN PLIST_ENTRY end_entry, IN PLONG Count, IN PVOID Address, IN LPCWSTR Name, IN INT Index, OUT PLDR_DATA_TABLE_ENTRY *pLdrEntry)
Definition: kdb_symbols.c:37
BOOLEAN KdbSymPrintAddress(IN PVOID Address, IN PKTRAP_FRAME Context)
Print address...
Definition: kdb_symbols.c:148
struct _IMAGE_SYMBOL_INFO_CACHE * PIMAGE_SYMBOL_INFO_CACHE
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define DbgPrint
Definition: loader.c:25
NTSTATUS KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo, IN ULONG_PTR RelativeAddress, OUT PULONG LineNumber OPTIONAL, OUT PCH FileName OPTIONAL, OUT PCH FunctionName OPTIONAL)
Get information for an address (source file, line number, function name)
Definition: kdb_symbols.c:204
VOID NTAPI KdbInitialize(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase)
Initializes the KDB symbols implementation.
Definition: kdb_symbols.c:479
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
char CHAR
Definition: xmlstorage.h:175
BOOLEAN RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, PROSSYM_INFO *RosSymInfo)
Definition: frommem.c:20
VOID RosSymDelete(PROSSYM_INFO RosSymInfo)
Definition: delete.c:16
LONG NTSTATUS
Definition: precomp.h:26
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo)
Definition: fromfile.c:20
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
uint16_t * PWCHAR
Definition: typedefs.h:54
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define InsertTailList(ListHead, Entry)
_Out_ PKIRQL Irql
Definition: csq.h:179
int32_t INT
Definition: typedefs.h:56
UNICODE_STRING FileName
Definition: kdb_symbols.c:24
#define FILE_SHARE_READ
Definition: compat.h:125
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
LIST_ENTRY KdProviders
Definition: kdinit.c:29
uint32_t ULONG_PTR
Definition: typedefs.h:63
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
PVOID DllBase
Definition: btrfs_drv.h:1784
UCHAR KIRQL
Definition: env_spec_w32.h:591
HANDLE FileHandle
Definition: stats.c:38
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define ANSI_NULL
long LONG
Definition: pedump.c:60
static KSPIN_LOCK SymbolFileListLock
Definition: kdb_symbols.c:31
short SHORT
Definition: pedump.c:59
_Check_return_ _CRTIMP int __cdecl _strnicmp(_In_reads_or_z_(_MaxCount) const char *_Str1, _In_reads_or_z_(_MaxCount) const char *_Str2, _In_ size_t _MaxCount)
CHAR * PCH
Definition: ntbasedef.h:398
#define PsGetCurrentProcess
Definition: psfuncs.h:17
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:251
struct _IMAGE_SYMBOL_INFO_CACHE IMAGE_SYMBOL_INFO_CACHE
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, ULONG_PTR RelativeAddress, ULONG *LineNumber, char *FileName, char *FunctionName)
Definition: find.c:94
void DPRINT(...)
Definition: polytest.cpp:61
return Found
Definition: dirsup.c:1270
PLOADER_PARAMETER_BLOCK KeLoaderBlock
Definition: krnlinit.c:29
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
VOID NTAPI KdbDebugPrint(PCH Message, ULONG Length)
Definition: kdb_symbols.c:464
PVOID PatchInformation
Definition: ldrtypes.h:164
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
int toupper(int c)
Definition: utclib.c:881
ULONG CurrentProcess
Definition: shell.c:125
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static PROSSYM_INFO KdbpSymFindCachedFile(IN PUNICODE_STRING FileName)
Find cached symbol file.
Definition: kdb_symbols.c:234
LIST_ENTRY PsLoadedModuleList
Definition: sysldr.c:34
PCHAR NTAPI KdbpSymUnicodeToAnsi(IN PUNICODE_STRING Unicode, OUT PCHAR Ansi, IN ULONG Length)
Definition: kdb_symbols.c:114
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
static const UCHAR Index[8]
Definition: usbohci.c:18
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
CHAR Message[80]
Definition: alive.c:5
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
VOID KdbSymProcessSymbols(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
Definition: kdb_symbols.c:424
Definition: btrfs_drv.h:1780
Definition: typedefs.h:117
#define SYNCHRONIZE
Definition: nt_native.h:61
Status
Definition: gdiplustypes.h:24
PFN_COUNT MmNumberOfPhysicalPages
Definition: init.c:48
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1206
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
static VOID KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, OUT PROSSYM_INFO *RosSymInfo)
Loads a symbol file.
Definition: kdb_symbols.c:358
static LSA_DISPATCH_TABLE DispatchTable
Definition: authpackage.c:164
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
UNICODE_STRING BaseDllName
Definition: ldrtypes.h:145
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
unsigned int * PULONG
Definition: retypes.h:1
#define min(a, b)
Definition: monoChain.cc:55
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
PROSSYM_INFO RosSymInfo
Definition: kdb_symbols.c:25
char * strchr(const char *String, int ch)
Definition: utclib.c:501
#define DPRINT1
Definition: precomp.h:8
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1264
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
static VOID KdbpSymRemoveCachedFile(IN PROSSYM_INFO RosSymInfo)
Remove a symbol file (reference) from the cache.
Definition: kdb_symbols.c:314
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define TAG_KDBS
Definition: kdb.h:7
BOOLEAN KdbpSymFindModule(IN PVOID Address OPTIONAL, IN LPCWSTR Name OPTIONAL, IN INT Index OPTIONAL, OUT PLDR_DATA_TABLE_ENTRY *pLdrEntry)
Find a module...
Definition: kdb_symbols.c:76
static BOOLEAN LoadSymbols
Definition: kdb_symbols.c:29
GLfloat GLfloat p
Definition: glext.h:8902
return STATUS_SUCCESS
Definition: btrfs.c:2966
signed int * PLONG
Definition: retypes.h:5
#define CHAR(Char)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
static LIST_ENTRY SymbolFileListHead
Definition: kdb_symbols.c:30
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68