A Discrete-Event Network Simulator
API
Files | Macros | Functions
Breakpoints

Trigger a debugger breakpoint. More...

Files

file  breakpoint.cc
 ns3::BreakpointFallback function implementation.
 
file  breakpoint.h
 NS_BREAKPOINT() macro definition and ns3::BreakpointFallback function declaration.
 

Macros

#define NS_BREAKPOINT()   ns3::BreakpointFallback ()
 Inserts a breakpoint instruction (or equivalent system call) into the code for selected machines. More...
 

Functions

void ns3::BreakpointFallback (void)
 fallback breakpoint function More...
 

Detailed Description

Trigger a debugger breakpoint.

Macro Definition Documentation

◆ NS_BREAKPOINT

#define NS_BREAKPOINT ( )    ns3::BreakpointFallback ()

Inserts a breakpoint instruction (or equivalent system call) into the code for selected machines.

When an NS_ASSERT cannot verify its condition, this macro is used. Falls back to calling ns3::BreakpointFallback() for architectures where breakpoint assembly instructions are not supported.

Definition at line 70 of file breakpoint.h.

Function Documentation

◆ BreakpointFallback()

void ns3::BreakpointFallback ( void  )

fallback breakpoint function

This function is used by the NS_BREAKPOINT() macro as a fallback for when breakpoint assembly instructions are not available. It attempts to halt program execution either by a raising SIGTRAP, on unix systems, or by dereferencing a null pointer.

Normally you should not call this function directly.

we test here to allow a debugger to change the value of the variable 'a' to allow the debugger to avoid the subsequent segfault.

Definition at line 52 of file breakpoint.cc.

References NS_LOG_FUNCTION_NOARGS.