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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
46
#if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
47
# define NS_BREAKPOINT() \
48
do { __asm__ __volatile__ ("int $03"); } while(false)
49
#elif defined (_MSC_VER) && defined (_M_IX86)
50
# define NS_BREAKPOINT() \
51
do { __asm int 3h } while(false)
52
#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
53
# define NS_BREAKPOINT() \
54
do { __asm__ __volatile__ ("bpt"); } while(false)
55
#else
/* !__i386__ && !__alpha__ */
56
# define NS_BREAKPOINT() ns3::BreakpointFallback ()
57
#endif
58
71
void
BreakpointFallback
(
void
);
72
73
74
}
// namespace ns3
75
76
77
#endif
/* BREAKPOINT_H */
ns3::BreakpointFallback
void BreakpointFallback(void)
fallback breakpoint function
Definition:
breakpoint.cc:46
src
core
model
breakpoint.h
Generated on Sat Apr 19 2014 14:06:51 for ns-3 by
1.8.6