Ignore:
Timestamp:
Nov 25, 2011, 10:19:52 PM (14 years ago)
Author:
dmik
Message:

Make the debug version of ported DLLs build.

Location:
branches/gcc-kmk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/include/dbglog.h

    r21717 r21824  
    9999
    100100/* enable support for the _interrupt() statement */
    101 #if (defined(__IBMCPP__) || defined(__IBMC__))
     101#if defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__)
     102
     103#ifndef __GNUC__
    102104#  include <builtin.h>
     105#endif
     106
    103107#ifdef DEBUG
     108
    104109#ifdef __cplusplus
    105110
    106 #define DebugInt3() BreakPoint(__FILE__, __FUNCTION__, __LINE__)
     111#ifdef PRIVATE_LOGGING
     112#define DebugInt3() do { \
     113    dprintf((LOG, "BREAKPOINT %s %s %d", __FILE__, __FUNCTION__, __LINE__)); \
     114    _interrupt(3); \
     115} while (0)
     116#else
     117#define DebugInt3() do { \
     118    dprintf(("BREAKPOINT %s %s %d", __FILE__, __FUNCTION__, __LINE__)); \
     119    _interrupt(3); \
     120} while (0)
     121#endif
    107122
    108 void inline BreakPoint(const char *szFile, const char *szFunction, int iLine)
    109 {
    110     dprintf(("BREAKPOINT %s %s %d", szFile, szFunction, iLine));
    111     _interrupt(3);
    112 }
    113 
    114 #else
     123#else /* __cplusplus */
    115124  #define DebugInt3()   _interrupt(3)
    116125#endif
    117 #else
     126
     127#else /* DEBUG */
    118128  #define DebugInt3()
    119129#endif
    120130
    121 #else
     131#else /* defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__) */
     132
    122133#ifdef DEBUG
    123134  #define DebugInt3()   _asm int 3;
     
    126137#endif
    127138
    128 #endif
     139#endif /* defined(__IBMCPP__) || defined(__IBMC__) || defined(__GNUC__) */
    129140
    130141#ifdef __cplusplus
  • branches/gcc-kmk/include/heapshared.h

    r21301 r21824  
    1818
    1919#ifdef DEBUG
    20     void * _System _debug_smalloc(int size, char *pszFile, int linenr);
    21     void * _System _debug_smallocfill(int size, int filler, char *pszFile, int linenr);
    22     void   _System _debug_sfree(void *chunk, char *pszFile, int linenr);
     20    void * _System _debug_smalloc(int size, const char *pszFile, int linenr);
     21    void * _System _debug_smallocfill(int size, int filler, const char *pszFile, int linenr);
     22    void   _System _debug_sfree(void *chunk, const char *pszFile, int linenr);
    2323
    2424    #define _smalloc(a)         _debug_smalloc((a),__FILE__,__LINE__)
  • branches/gcc-kmk/include/odinwrap.h

    r21790 r21824  
    3737
    3838#ifdef DEBUG
    39 #  define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
    40 #  define ODINDEBUGCHANNEL1(a) static char* pszOdinDebugChannel1=#a;
     39#  define ODINDEBUGCHANNEL(a) static const char *pszOdinDebugChannel = #a;
     40#  define ODINDEBUGCHANNEL1(a) static const char *pszOdinDebugChannel1 = #a;
    4141#else
    4242#  define ODINDEBUGCHANNEL(a)
     
    6161#include <odin.h>
    6262
    63 //#ifdef __cplusplus
     63#ifdef __cplusplus
    6464extern "C" {
    65 //#endif
     65#endif
    6666
    6767// ---------------------------------------------------------------------------
     
    7575extern void              WIN32API dbg_IncThreadCallDepth(void); // kernel32
    7676extern void              WIN32API dbg_DecThreadCallDepth(void); // kernel32
    77 extern void              WIN32API dbg_ThreadPushCall(char *pszCaller);
     77extern void              WIN32API dbg_ThreadPushCall(const char *pszCaller);
    7878extern void              WIN32API dbg_ThreadPopCall();
    7979extern char*             WIN32API dbg_GetLastCallerName();
    8080
    81 //#ifdef __cplusplus
     81#ifdef __cplusplus
    8282} // extern "C"
    83 //#endif
     83#endif
    8484
    8585// ---------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.