A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Breakpoints

Trigger a debugger breakpoint. More...

+ Collaboration diagram for Breakpoints:

Files

file  breakpoint.cc
 ns3::BreakpointFallback function implementation.
 
file  breakpoint.h
 Definition of NS_BREAKPOINT() macro 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

#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 AssertBreakpoint() for architectures where breakpoint assembly instructions are not supported.

Definition at line 70 of file breakpoint.h.

Function Documentation

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.