[NTOS:KD] Move some declarations where they belong

This commit is contained in:
Hervé Poussineau 2020-03-31 23:40:14 +02:00
parent 67e9cc00b2
commit ba37323a62
4 changed files with 32 additions and 43 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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 */

View file

@ -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,