src/core/model/breakpoint.h
changeset 7169 358f71a624d8
parent 6821 203367ae7433
child 7252 c8200621e252
equal deleted inserted replaced
7168:7c724be8f9a6 7169:358f71a624d8
    43  * AssertBreakpoint() for architectures where breakpoint assembly
    43  * AssertBreakpoint() for architectures where breakpoint assembly
    44  * instructions are not supported.
    44  * instructions are not supported.
    45  */
    45  */
    46 #if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
    46 #if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
    47 #  define NS_BREAKPOINT() \
    47 #  define NS_BREAKPOINT() \
    48    do{ __asm__ __volatile__ ("int $03"); }while(false)
    48   do { __asm__ __volatile__ ("int $03"); }while(false)
    49 #elif defined (_MSC_VER) && defined (_M_IX86)
    49 #elif defined (_MSC_VER) && defined (_M_IX86)
    50 #  define NS_BREAKPOINT() \
    50 #  define NS_BREAKPOINT() \
    51    do{ __asm int 3h }while(false)
    51   do { __asm int 3h }while(false)
    52 #elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
    52 #elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
    53 #  define NS_BREAKPOINT() \
    53 #  define NS_BREAKPOINT() \
    54    do{ __asm__ __volatile__ ("bpt"); }while(false)
    54   do { __asm__ __volatile__ ("bpt"); }while(false)
    55 #else	/* !__i386__ && !__alpha__ */
    55 #else   /* !__i386__ && !__alpha__ */
    56 #  define NS_BREAKPOINT()    ns3::BreakpointFallback ()
    56 #  define NS_BREAKPOINT()    ns3::BreakpointFallback ()
    57 #endif
    57 #endif
    58 
    58 
    59 /**
    59 /**
    60  * \brief fallback breakpoint function
    60  * \brief fallback breakpoint function
    67  * Normally you should not call this function directly.
    67  * Normally you should not call this function directly.
    68  */
    68  */
    69 void BreakpointFallback (void);
    69 void BreakpointFallback (void);
    70 
    70 
    71 
    71 
    72 }//namespace ns3
    72 } //namespace ns3
    73 
    73 
    74 
    74 
    75 #endif /* BREAKPOINT_H */
    75 #endif /* BREAKPOINT_H */