Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsDebug.cpp File Reference
#include "nsXPCOM.h"
#include "nsXPCOMPrivate.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsDebug.h"
#include "nsDebugImpl.h"

Go to the source code of this file.

Defines

#define ENSURE_DEBUGOBJECT   (gDebugObject ? PR_TRUE : (PRBool)(SetupDebugObject() != nsnull))

Functions

static NS_METHOD FreeDebugObject (void)
static nsIDebugSetupDebugObject ()
void NSGlue_Abort (const char *aFile, PRIntn aLine)
 Abort the executing program.
void NSGlue_Break (const char *aFile, PRIntn aLine)
 Break the executing program into the debugger.
void NSGlue_Warning (const char *aStr, const char *aFile, PRIntn aLine)
 Namespace for debugging methods.
void NSGlue_Assertion (const char *aStr, const char *aExpr, const char *aFile, PRIntn aLine)
 Log an assertion message to the debug log.

Variables

static nsIDebuggDebugObject = nsnull

Define Documentation

Definition at line 52 of file nsDebug.cpp.


Function Documentation

static NS_METHOD FreeDebugObject ( void  ) [static]

Definition at line 46 of file nsDebug.cpp.

Here is the caller graph for this function:

void NSGlue_Abort ( const char *  aFile,
PRIntn  aLine 
)

Abort the executing program.

This works on all architectures.

Definition at line 78 of file nsDebug.cpp.

{     
  if (!ENSURE_DEBUGOBJECT)
    return;    
  
  gDebugObject->Abort(aFile, aLine);
}     
void NSGlue_Assertion ( const char *  aStr,
const char *  aExpr,
const char *  aFile,
PRIntn  aLine 
)

Log an assertion message to the debug log.

Definition at line 101 of file nsDebug.cpp.

{ 
  if (!ENSURE_DEBUGOBJECT)
    return;    
  gDebugObject->Assertion(aStr, aExpr, aFile, aLine);
}
void NSGlue_Break ( const char *  aFile,
PRIntn  aLine 
)

Break the executing program into the debugger.

Definition at line 86 of file nsDebug.cpp.

{ 
  if (!ENSURE_DEBUGOBJECT)
    return;    
  
  gDebugObject->Break(aFile, aLine);
}
void NSGlue_Warning ( const char *  aMessage,
const char *  aFile,
PRIntn  aLine 
)

Namespace for debugging methods.

Note that your code must use the macros defined later in this file so that the debug code can be conditionally compiled out. Log a warning message to the debug log.

Definition at line 94 of file nsDebug.cpp.

{ 
  if (!ENSURE_DEBUGOBJECT)
    return;    
  gDebugObject->Warning(aStr, aFile, aLine);
}
static nsIDebug* SetupDebugObject ( ) [static]

Definition at line 55 of file nsDebug.cpp.

Here is the call graph for this function:


Variable Documentation

Definition at line 44 of file nsDebug.cpp.