A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
breakpoint.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006,2007 INRIA, INESC Porto
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
* Author: Gustavo Carneiro <gjc@inescporto.pt>
19
*/
20
21
#include "
breakpoint.h
"
22
23
#include "
log.h
"
24
25
#include "ns3/core-config.h"
26
#ifdef HAVE_SIGNAL_H
27
#include <signal.h>
28
#endif
29
30
namespace
ns3
31
{
32
39
NS_LOG_COMPONENT_DEFINE
(
"Breakpoint"
);
40
41
#if defined(HAVE_SIGNAL_H) && defined(SIGTRAP)
42
43
void
44
BreakpointFallback
()
45
{
46
NS_LOG_FUNCTION_NOARGS
();
47
48
raise(SIGTRAP);
49
}
50
51
#else
52
53
void
54
BreakpointFallback
()
55
{
56
NS_LOG_FUNCTION_NOARGS
();
57
58
int
* a =
nullptr
;
64
if
(a ==
nullptr
)
65
{
66
*a = 0;
67
}
68
}
69
70
#endif
// HAVE_SIGNAL_H
71
72
}
// namespace ns3
breakpoint.h
NS_BREAKPOINT() macro definition and ns3::BreakpointFallback function declaration.
ns3::BreakpointFallback
void BreakpointFallback()
fallback breakpoint function
Definition:
breakpoint.cc:54
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition:
log-macros-enabled.h:204
log.h
Debug message logging.
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
core
model
breakpoint.cc
Generated on Sun Jul 2 2023 18:21:31 for ns-3 by
1.9.6