https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ba37323a62b23425eb912…
commit ba37323a62b23425eb912de30a40e4cbe01493b9
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Tue Mar 31 23:40:14 2020 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Nov 16 08:55:03 2020 +0100
[NTOS:KD] Move some declarations where they belong
---
ntoskrnl/include/internal/kd.h | 42 ------------------------------------------
ntoskrnl/kdbg/kdb.h | 16 ++++++++++++++++
ntoskrnl/kdbg/kdb_cli.c | 7 +++++++
ntoskrnl/kdbg/kdb_symbols.c | 10 +++++++++-
4 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h
index 4a7ba13b382..6a509de9db0 100644
--- a/ntoskrnl/include/internal/kd.h
+++ b/ntoskrnl/include/internal/kd.h
@@ -30,48 +30,6 @@ KdPortPutByteEx(
/* SYMBOL ROUTINES **********************************************************/
#ifdef __NTOSKRNL__
-#if defined(KDBG) || DBG
-
-#if defined(KDBG)
-typedef
-BOOLEAN
-(NTAPI *PKDBG_CLI_ROUTINE)(
- IN PCHAR Command,
- IN ULONG Argc,
- IN PCH Argv[]);
-
-BOOLEAN
-NTAPI
-KdbRegisterCliCallback(
- PVOID Callback,
- BOOLEAN Deregister);
-#endif
-
-VOID
-KdbSymProcessSymbols(
- IN PLDR_DATA_TABLE_ENTRY LdrEntry);
-
-
-BOOLEAN
-KdbSymPrintAddress(
- IN PVOID Address,
- IN PKTRAP_FRAME Context
-);
-
-NTSTATUS
-KdbSymGetAddressInformation(
- IN PROSSYM_INFO RosSymInfo,
- IN ULONG_PTR RelativeAddress,
-#ifdef __ROS_DWARF__
- IN PROSSYM_LINEINFO RosSymLineInfo
-#else
- OUT PULONG LineNumber OPTIONAL,
- OUT PCH FileName OPTIONAL,
- OUT PCH FunctionName OPTIONAL
-#endif
-);
-#endif
-
#ifdef KDBG
# define KdbInit() KdbpCliInit()
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h
index b6419079e61..85c980b8250 100644
--- a/ntoskrnl/kdbg/kdb.h
+++ b/ntoskrnl/kdbg/kdb.h
@@ -96,6 +96,12 @@ KdbpStackSwitchAndCall(
extern PCHAR KdbInitFileBuffer;
+BOOLEAN
+NTAPI
+KdbRegisterCliCallback(
+ PVOID Callback,
+ BOOLEAN Deregister);
+
VOID
KdbpCliInit(VOID);
@@ -154,6 +160,16 @@ KdbpSymFindModule(
IN INT Index OPTIONAL,
OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry);
+BOOLEAN
+KdbSymPrintAddress(
+ IN PVOID Address,
+ IN PKTRAP_FRAME Context
+);
+
+VOID
+KdbSymProcessSymbols(
+ IN PLDR_DATA_TABLE_ENTRY LdrEntry);
+
/* from kdb.c */
extern PEPROCESS KdbCurrentProcess;
diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c
index 7314086c2f6..bcb30f84e7e 100644
--- a/ntoskrnl/kdbg/kdb_cli.c
+++ b/ntoskrnl/kdbg/kdb_cli.c
@@ -105,6 +105,13 @@ static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
/* GLOBALS *******************************************************************/
+typedef
+BOOLEAN
+(NTAPI *PKDBG_CLI_ROUTINE)(
+ IN PCHAR Command,
+ IN ULONG Argc,
+ IN PCH Argv[]);
+
static PKDBG_CLI_ROUTINE KdbCliCallbacks[10];
static BOOLEAN KdbUseIntelSyntax = FALSE; /* Set to TRUE for intel syntax */
static BOOLEAN KdbBreakOnModuleLoad = FALSE; /* Set to TRUE to break into KDB when a
module is loaded */
diff --git a/ntoskrnl/kdbg/kdb_symbols.c b/ntoskrnl/kdbg/kdb_symbols.c
index a3db0abe7fc..7dae01e780f 100644
--- a/ntoskrnl/kdbg/kdb_symbols.c
+++ b/ntoskrnl/kdbg/kdb_symbols.c
@@ -33,6 +33,14 @@ BOOLEAN KdbpSymbolsInitialized = FALSE;
/* FUNCTIONS ****************************************************************/
+static NTSTATUS
+KdbSymGetAddressInformation(
+ IN PROSSYM_INFO RosSymInfo,
+ IN ULONG_PTR RelativeAddress,
+ OUT PULONG LineNumber OPTIONAL,
+ OUT PCH FileName OPTIONAL,
+ OUT PCH FunctionName OPTIONAL);
+
static BOOLEAN
KdbpSymSearchModuleList(
IN PLIST_ENTRY current_entry,
@@ -200,7 +208,7 @@ KdbSymPrintAddress(
* \retval STATUS_SUCCESS At least one of the requested informations was found.
* \retval STATUS_UNSUCCESSFUL None of the requested information was found.
*/
-NTSTATUS
+static NTSTATUS
KdbSymGetAddressInformation(
IN PROSSYM_INFO RosSymInfo,
IN ULONG_PTR RelativeAddress,