A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
breakpoint.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006,2007 INESC Porto, INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Gustavo Carneiro <gjc@inescporto.pt>
19
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
*/
21
#ifndef BREAKPOINT_H
22
#define BREAKPOINT_H
23
24
namespace
ns3
{
25
26
/* Hacker macro to place breakpoints for selected machines.
27
* Actual use is strongly discouraged of course ;)
28
* Copied from GLib 2.12.9.
29
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
30
*
31
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
32
* file for a list of people on the GLib Team. See the ChangeLog
33
* files for a list of changes. These files are distributed with
34
* GLib at ftp://ftp.gtk.org/pub/gtk/.
35
*/
36
53
#if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
54
# define NS_BREAKPOINT() \
55
do { __asm__ __volatile__ ("int $03"); } while(false)
56
#elif defined (_MSC_VER) && defined (_M_IX86)
57
# define NS_BREAKPOINT() \
58
do { __asm int 3h } while(false)
59
#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
60
# define NS_BREAKPOINT() \
61
do { __asm__ __volatile__ ("bpt"); } while(false)
62
#else
/* !__i386__ && !__alpha__ */
63
# define NS_BREAKPOINT() ns3::BreakpointFallback ()
64
#endif
65
78
void
BreakpointFallback
(
void
);
79
80
81
}
// namespace ns3
82
83
84
#endif
/* BREAKPOINT_H */
ns3::BreakpointFallback
void BreakpointFallback(void)
fallback breakpoint function
Definition:
breakpoint.cc:46
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
core
model
breakpoint.h
Generated on Thu Feb 5 2015 18:33:33 for ns-3 by
1.8.9.1