A Discrete-Event Network Simulator
API
Debugging tools

Assertions, breakpoints, logging, and abnormal program termination. More...

+ Collaboration diagram for Debugging tools:

Modules

 Assertions
 Assert functions and macros.
 
 Breakpoints
 Trigger a debugger breakpoint.
 
 Logging
 Logging functions and macros.
 

Files

file  build-profile-test-suite.cc
 NS_BUILD_PROFILE macros test suite.
 
file  build-profile.h
 NS_BUILD_DEBUG, NS_BUILD_RELEASE, and NS_BUILD_OPTIMIZED macro definitions.
 

Classes

class  ns3::ShowProgress
 Periodically print a status message indicating simulator progress. More...
 

Macros

#define NS_BUILD_DEBUG(code)   NS_BUILD_PROFILE_OP(code)
 Execute a code snippet in debug builds. More...
 
#define NS_BUILD_OPTIMIZED(code)   NS_BUILD_PROFILE_OP(code)
 Execute a code snippet in optimized builds. More...
 
#define NS_BUILD_PROFILE_NOOP(code)
 Build profile no-op macro. More...
 
#define NS_BUILD_PROFILE_OP(code)
 Build profile macro to execute a code snippet. More...
 
#define NS_BUILD_RELEASE(code)   NS_BUILD_PROFILE_OP(code)
 Execute a code snippet in release builds. More...
 

Detailed Description

Assertions, breakpoints, logging, and abnormal program termination.

Macro Definition Documentation

◆ NS_BUILD_DEBUG

#define NS_BUILD_DEBUG (   code)    NS_BUILD_PROFILE_OP(code)

Execute a code snippet in debug builds.

Parameters
[in]codeThe code to execute.

Definition at line 60 of file build-profile.h.

◆ NS_BUILD_OPTIMIZED

#define NS_BUILD_OPTIMIZED (   code)    NS_BUILD_PROFILE_OP(code)

Execute a code snippet in optimized builds.

Parameters
[in]codeThe code to execute.

Definition at line 82 of file build-profile.h.

◆ NS_BUILD_PROFILE_NOOP

#define NS_BUILD_PROFILE_NOOP (   code)
Value:
do \
if (false) \
{ \
code; \
} \
while (false)

Build profile no-op macro.

Parameters
[in]codeThe code to skip.

Definition at line 35 of file build-profile.h.

◆ NS_BUILD_PROFILE_OP

#define NS_BUILD_PROFILE_OP (   code)
Value:
do \
{ \
code; \
} while (false)

Build profile macro to execute a code snippet.

Parameters
[in]codeThe code to execute.

Definition at line 48 of file build-profile.h.

◆ NS_BUILD_RELEASE

#define NS_BUILD_RELEASE (   code)    NS_BUILD_PROFILE_OP(code)

Execute a code snippet in release builds.

Parameters
[in]codeThe code to execute.

Definition at line 71 of file build-profile.h.