Added FUNCTION_EXIT macro

date	99.05.19.22.14.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:06:45 +00:00
parent 08f6f034d0
commit f0299e6c81
2 changed files with 44 additions and 12 deletions

View File

@ -151,8 +151,35 @@ void
FunctionTrace (char *ModuleName, INT32 LineNumber, INT32 ComponentId, char * FunctionName)
{
NestingLevel++;
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
"Entered Function: %s\n", FunctionName);
" %2.2d Entered Function: %s\n", NestingLevel, FunctionName);
}
/*****************************************************************************
*
* FUNCTION: FunctionExit
*
* PARAMETERS: ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
* ComponentId - Caller's component ID (for error output)
* FunctionName - Name of Caller's function
*
* RETURN: None
*
* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
* set in DebugLevel
*
****************************************************************************/
void
FunctionExit (char *ModuleName, INT32 LineNumber, INT32 ComponentId, char * FunctionName)
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
" %2.2d Exiting Function: %s\n", NestingLevel, FunctionName);
NestingLevel--;
}
@ -188,7 +215,7 @@ DebugPrint (char *ModuleName, INT32 LineNumber, INT32 ComponentId, INT32 PrintLe
{
va_start (args, Format);
OsdPrintf (NULL, "%10s(%04d-%02x): ", ModuleName, LineNumber, ComponentId);
OsdPrintf (NULL, "%10s(%04d): ", ModuleName, LineNumber);
OsdVprintf (NULL, Format, args);
va_end (args);
@ -216,7 +243,7 @@ DebugPrintPrefix (char *ModuleName, INT32 LineNumber, INT32 ComponentId)
{
OsdPrintf (NULL, "%10s(%04d-%02x): ", ModuleName, LineNumber, ComponentId);
OsdPrintf (NULL, "%10s(%04d): ", ModuleName, LineNumber);
}

View File

@ -115,14 +115,14 @@
/* Debug switch - level and trace mask */
#ifdef _DEBUG
INT32 DebugLevel = DEBUG_DEFAULT;
UINT32 DebugLevel = DEBUG_DEFAULT;
#else
INT32 DebugLevel = NORMAL_DEFAULT;
UINT32 DebugLevel = NORMAL_DEFAULT;
#endif
/* Debug switch - layer (component) mask */
INT32 DebugLayer = ALL_COMPONENTS;
UINT32 DebugLayer = ALL_COMPONENTS;
@ -186,7 +186,6 @@ InitAcpiLibGlobals (void)
NameString = NULL;
NameStringSize = 0;
/* Interpreter */
BufSeq = 0;
@ -194,13 +193,10 @@ InitAcpiLibGlobals (void)
/* Hardware oriented */
RestoreAcpiChipset = TRUE;
Pm1EnableRegisterSave = 0;
Gpe0EnableRegisterSave = NULL;
Gpe1EnableRegisterSave = NULL;
EdgeLevelSave = SAVE_NOT_VALID;
IrqEnableSave = SAVE_NOT_VALID;
OriginalMode = SAVE_NOT_VALID; /* original ACPI/legacy mode */
OriginalMode = -1; /* original ACPI/legacy mode */
SciHandle = 0;
@ -220,6 +216,13 @@ InitAcpiLibGlobals (void)
RootObject->Type = TYPE_Any;
RootObject->Value = NULL;
/* Debug */
NestingLevel = 0;
FUNCTION_EXIT;
}
@ -278,5 +281,7 @@ AcpiLocalCleanup (void)
OsdFree (SBDT);
}
FUNCTION_EXIT;
}