A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Breakpoints
+ Collaboration diagram for Breakpoints:

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.
 

Functions

void ns3::BreakpointFallback ()
 fallback breakpoint function
 

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 69 of file breakpoint.h.

Function Documentation

◆ BreakpointFallback()

void ns3::BreakpointFallback ( )

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 43 of file breakpoint.cc.

References NS_LOG_FUNCTION_NOARGS.