Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
dbe2cd90
Commit
dbe2cd90
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Moved debug definitions to include/wine/debug.h.
parent
18f4d651
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/Makefile.in
+1
-0
1 addition, 0 deletions
include/Makefile.in
include/debugtools.h
+2
-157
2 additions, 157 deletions
include/debugtools.h
include/wine/debug.h
+159
-0
159 additions, 0 deletions
include/wine/debug.h
tools/winedump/output.c
+2
-2
2 additions, 2 deletions
tools/winedump/output.c
with
164 additions
and
159 deletions
include/Makefile.in
+
1
−
0
View file @
dbe2cd90
...
...
@@ -132,6 +132,7 @@ INSTALLED_INCLUDES = \
windef.h
\
windows.h
\
windowsx.h
\
wine/debug.h
\
wine/exception.h
\
wine/icmpapi.h
\
wine/ipexport.h
\
...
...
This diff is collapsed.
Click to expand it.
include/debugtools.h
+
2
−
157
View file @
dbe2cd90
#ifndef __WINE_DEBUGTOOLS_H
#define __WINE_DEBUGTOOLS_H
#include
<stdarg.h>
#include
"windef.h"
#ifdef __cplusplus
extern
"C"
{
#endif
struct
_GUID
;
/*
* Internal definitions (do not use these directly)
*/
enum
__WINE_DEBUG_CLASS
{
__WINE_DBCL_FIXME
,
__WINE_DBCL_ERR
,
__WINE_DBCL_WARN
,
__WINE_DBCL_TRACE
,
__WINE_DBCL_COUNT
};
#ifndef NO_TRACE_MSGS
# define __WINE_GET_DEBUGGING_TRACE(dbch) ((dbch)[0] & (1 << __WINE_DBCL_TRACE))
#else
# define __WINE_GET_DEBUGGING_TRACE(dbch) 0
#endif
#ifndef NO_DEBUG_MSGS
# define __WINE_GET_DEBUGGING_WARN(dbch) ((dbch)[0] & (1 << __WINE_DBCL_WARN))
# define __WINE_GET_DEBUGGING_FIXME(dbch) ((dbch)[0] & (1 << __WINE_DBCL_FIXME))
#else
# define __WINE_GET_DEBUGGING_WARN(dbch) 0
# define __WINE_GET_DEBUGGING_FIXME(dbch) 0
#endif
/* define error macro regardless of what is configured */
#define __WINE_GET_DEBUGGING_ERR(dbch) ((dbch)[0] & (1 << __WINE_DBCL_ERR))
#define __WINE_GET_DEBUGGING(dbcl,dbch) __WINE_GET_DEBUGGING##dbcl(dbch)
#define __WINE_SET_DEBUGGING(dbcl,dbch,on) \
((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
#ifdef __GNUC__
#define __WINE_DPRINTF(dbcl,dbch) \
do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
const char * const __dbch = (dbch); \
const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \
__WINE_DBG_LOG
#define __WINE_DBG_LOG(args...) \
wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
#define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
#else
/* __GNUC__ */
#define __WINE_DPRINTF(dbcl,dbch) \
(!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
(wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__),0)) ? \
(void)0 : (void)wine_dbg_printf
#define __WINE_PRINTF_ATTR(fmt, args)
#endif
/* __GNUC__ */
/*
* Exported definitions and macros
*/
/* These function return a printable version of a string, including
quotes. The string will be valid for some time, but not indefinitely
as strings are re-used. */
extern
const
char
*
wine_dbgstr_an
(
const
char
*
s
,
int
n
);
extern
const
char
*
wine_dbgstr_wn
(
const
WCHAR
*
s
,
int
n
);
extern
const
char
*
wine_dbgstr_guid
(
const
struct
_GUID
*
id
);
extern
int
wine_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
__WINE_PRINTF_ATTR
(
1
,
0
);
extern
int
wine_dbg_printf
(
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
1
,
2
);
extern
int
wine_dbg_log
(
enum
__WINE_DEBUG_CLASS
cls
,
const
char
*
ch
,
const
char
*
func
,
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
4
,
5
);
inline
static
const
char
*
wine_dbgstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
wine_dbgstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,__wine_dbch_##ch)
#define WINE_TRACE_ON(ch) __WINE_GET_DEBUGGING(_TRACE,__wine_dbch_##ch)
#define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
#define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,__wine_dbch_##ch)
#define WINE_WARN_ON(ch) __WINE_GET_DEBUGGING(_WARN,__wine_dbch_##ch)
#define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
#define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,__wine_dbch_##ch)
#define WINE_FIXME_ON(ch) __WINE_GET_DEBUGGING(_FIXME,__wine_dbch_##ch)
#define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
#define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,__wine_dbch_##ch)
#define WINE_ERR_ON(ch) __WINE_GET_DEBUGGING(_ERR,__wine_dbch_##ch)
#define WINE_DECLARE_DEBUG_CHANNEL(ch) \
extern char __wine_dbch_##ch[]
#define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
extern char __wine_dbch_##ch[]; \
static char * const __wine_dbch___default = __wine_dbch_##ch
#define WINE_DPRINTF wine_dbg_printf
#define WINE_MESSAGE wine_dbg_printf
#ifdef __WINE__
/* Wine uses shorter names that are very likely to conflict with other software */
inline
static
const
char
*
debugstr_an
(
const
char
*
s
,
int
n
)
{
return
wine_dbgstr_an
(
s
,
n
);
}
inline
static
const
char
*
debugstr_wn
(
const
WCHAR
*
s
,
int
n
)
{
return
wine_dbgstr_wn
(
s
,
n
);
}
inline
static
const
char
*
debugstr_guid
(
const
struct
_GUID
*
id
)
{
return
wine_dbgstr_guid
(
id
);
}
inline
static
const
char
*
debugstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
inline
static
const
char
*
debugres_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugres_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define TRACE WINE_TRACE
#define TRACE_(ch) WINE_TRACE_(ch)
#define TRACE_ON(ch) WINE_TRACE_ON(ch)
#define WARN WINE_WARN
#define WARN_(ch) WINE_WARN_(ch)
#define WARN_ON(ch) WINE_WARN_ON(ch)
#define FIXME WINE_FIXME
#define FIXME_(ch) WINE_FIXME_(ch)
#define FIXME_ON(ch) WINE_FIXME_ON(ch)
#undef ERR
/* Solaris got an 'ERR' define in <sys/reg.h> */
#define ERR WINE_ERR
#define ERR_(ch) WINE_ERR_(ch)
#define ERR_ON(ch) WINE_ERR_ON(ch)
#define DECLARE_DEBUG_CHANNEL(ch) WINE_DECLARE_DEBUG_CHANNEL(ch)
#define DEFAULT_DEBUG_CHANNEL(ch) WINE_DEFAULT_DEBUG_CHANNEL(ch)
#define DPRINTF WINE_DPRINTF
#define MESSAGE WINE_MESSAGE
#endif
/* __WINE__ */
#ifdef __cplusplus
}
#endif
#endif
/* __WINE_DEBUGTOOLS_H */
/* for backwards compatibility */
#include
"wine/debug.h"
This diff is collapsed.
Click to expand it.
include/wine/debug.h
0 → 100644
+
159
−
0
View file @
dbe2cd90
/*
* Wine debugging interface
*/
#ifndef __WINE_WINE_DEBUG_H
#define __WINE_WINE_DEBUG_H
#include
<stdarg.h>
#include
"windef.h"
#ifdef __cplusplus
extern
"C"
{
#endif
struct
_GUID
;
/*
* Internal definitions (do not use these directly)
*/
enum
__WINE_DEBUG_CLASS
{
__WINE_DBCL_FIXME
,
__WINE_DBCL_ERR
,
__WINE_DBCL_WARN
,
__WINE_DBCL_TRACE
,
__WINE_DBCL_COUNT
};
#ifndef NO_TRACE_MSGS
# define __WINE_GET_DEBUGGING_TRACE(dbch) ((dbch)[0] & (1 << __WINE_DBCL_TRACE))
#else
# define __WINE_GET_DEBUGGING_TRACE(dbch) 0
#endif
#ifndef NO_DEBUG_MSGS
# define __WINE_GET_DEBUGGING_WARN(dbch) ((dbch)[0] & (1 << __WINE_DBCL_WARN))
# define __WINE_GET_DEBUGGING_FIXME(dbch) ((dbch)[0] & (1 << __WINE_DBCL_FIXME))
#else
# define __WINE_GET_DEBUGGING_WARN(dbch) 0
# define __WINE_GET_DEBUGGING_FIXME(dbch) 0
#endif
/* define error macro regardless of what is configured */
#define __WINE_GET_DEBUGGING_ERR(dbch) ((dbch)[0] & (1 << __WINE_DBCL_ERR))
#define __WINE_GET_DEBUGGING(dbcl,dbch) __WINE_GET_DEBUGGING##dbcl(dbch)
#define __WINE_SET_DEBUGGING(dbcl,dbch,on) \
((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
#ifdef __GNUC__
#define __WINE_DPRINTF(dbcl,dbch) \
do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
const char * const __dbch = (dbch); \
const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \
__WINE_DBG_LOG
#define __WINE_DBG_LOG(args...) \
wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
#define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
#else
/* __GNUC__ */
#define __WINE_DPRINTF(dbcl,dbch) \
(!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
(wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__),0)) ? \
(void)0 : (void)wine_dbg_printf
#define __WINE_PRINTF_ATTR(fmt, args)
#endif
/* __GNUC__ */
/*
* Exported definitions and macros
*/
/* These function return a printable version of a string, including
quotes. The string will be valid for some time, but not indefinitely
as strings are re-used. */
extern
const
char
*
wine_dbgstr_an
(
const
char
*
s
,
int
n
);
extern
const
char
*
wine_dbgstr_wn
(
const
WCHAR
*
s
,
int
n
);
extern
const
char
*
wine_dbgstr_guid
(
const
struct
_GUID
*
id
);
extern
int
wine_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
__WINE_PRINTF_ATTR
(
1
,
0
);
extern
int
wine_dbg_printf
(
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
1
,
2
);
extern
int
wine_dbg_log
(
enum
__WINE_DEBUG_CLASS
cls
,
const
char
*
ch
,
const
char
*
func
,
const
char
*
format
,
...
)
__WINE_PRINTF_ATTR
(
4
,
5
);
inline
static
const
char
*
wine_dbgstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
wine_dbgstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,__wine_dbch_##ch)
#define WINE_TRACE_ON(ch) __WINE_GET_DEBUGGING(_TRACE,__wine_dbch_##ch)
#define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
#define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,__wine_dbch_##ch)
#define WINE_WARN_ON(ch) __WINE_GET_DEBUGGING(_WARN,__wine_dbch_##ch)
#define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
#define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,__wine_dbch_##ch)
#define WINE_FIXME_ON(ch) __WINE_GET_DEBUGGING(_FIXME,__wine_dbch_##ch)
#define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
#define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,__wine_dbch_##ch)
#define WINE_ERR_ON(ch) __WINE_GET_DEBUGGING(_ERR,__wine_dbch_##ch)
#define WINE_DECLARE_DEBUG_CHANNEL(ch) \
extern char __wine_dbch_##ch[]
#define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
extern char __wine_dbch_##ch[]; \
static char * const __wine_dbch___default = __wine_dbch_##ch
#define WINE_DPRINTF wine_dbg_printf
#define WINE_MESSAGE wine_dbg_printf
#ifdef __WINE__
/* Wine uses shorter names that are very likely to conflict with other software */
inline
static
const
char
*
debugstr_an
(
const
char
*
s
,
int
n
)
{
return
wine_dbgstr_an
(
s
,
n
);
}
inline
static
const
char
*
debugstr_wn
(
const
WCHAR
*
s
,
int
n
)
{
return
wine_dbgstr_wn
(
s
,
n
);
}
inline
static
const
char
*
debugstr_guid
(
const
struct
_GUID
*
id
)
{
return
wine_dbgstr_guid
(
id
);
}
inline
static
const
char
*
debugstr_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugstr_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
inline
static
const
char
*
debugres_a
(
const
char
*
s
)
{
return
wine_dbgstr_an
(
s
,
80
);
}
inline
static
const
char
*
debugres_w
(
const
WCHAR
*
s
)
{
return
wine_dbgstr_wn
(
s
,
80
);
}
#define TRACE WINE_TRACE
#define TRACE_(ch) WINE_TRACE_(ch)
#define TRACE_ON(ch) WINE_TRACE_ON(ch)
#define WARN WINE_WARN
#define WARN_(ch) WINE_WARN_(ch)
#define WARN_ON(ch) WINE_WARN_ON(ch)
#define FIXME WINE_FIXME
#define FIXME_(ch) WINE_FIXME_(ch)
#define FIXME_ON(ch) WINE_FIXME_ON(ch)
#undef ERR
/* Solaris got an 'ERR' define in <sys/reg.h> */
#define ERR WINE_ERR
#define ERR_(ch) WINE_ERR_(ch)
#define ERR_ON(ch) WINE_ERR_ON(ch)
#define DECLARE_DEBUG_CHANNEL(ch) WINE_DECLARE_DEBUG_CHANNEL(ch)
#define DEFAULT_DEBUG_CHANNEL(ch) WINE_DEFAULT_DEBUG_CHANNEL(ch)
#define DPRINTF WINE_DPRINTF
#define MESSAGE WINE_MESSAGE
#endif
/* __WINE__ */
#ifdef __cplusplus
}
#endif
#endif
/* __WINE_WINE_DEBUG_H */
This diff is collapsed.
Click to expand it.
tools/winedump/output.c
+
2
−
2
View file @
dbe2cd90
...
...
@@ -136,7 +136,7 @@ void output_header_preamble (void)
"/*
\n
* %s.dll
\n
*
\n
* Generated from %s.dll by winedump.
\n
*
\n
"
" * DO NOT SEND GENERATED DLLS FOR INCLUSION INTO WINE !
\n
*
\n
*/"
"
\n
#ifndef __WINE_%s_DLL_H
\n
#define __WINE_%s_DLL_H
\n\n
#include "
"
\"
config.h
\"\n
#include
\"
windef.h
\"\n
#include
\"
debug
tools
.h
\"\n
"
"
\"
config.h
\"\n
#include
\"
windef.h
\"\n
#include
\"
wine/
debug.h
\"\n
"
"#include
\"
winbase.h
\"\n
#include
\"
winnt.h
\"\n\n\n
"
,
OUTPUT_DLL_NAME
,
OUTPUT_DLL_NAME
,
OUTPUT_UC_DLL_NAME
,
OUTPUT_UC_DLL_NAME
);
...
...
@@ -201,7 +201,7 @@ void output_c_preamble (void)
fprintf
(
cfile
,
"/*
\n
* %s.dll
\n
*
\n
* Generated from %s by winedump.
\n
*
\n
"
" * DO NOT SUBMIT GENERATED DLLS FOR INCLUSION INTO WINE!
\n
*
\n
*/"
"
\n\n
#include
\"
%s_dll.h
\"\n\n
DEFAULT_DEBUG_CHANNEL(%s);
\n\n
"
,
"
\n\n
#include
\"
%s_dll.h
\"\n\n
WINE_
DEFAULT_DEBUG_CHANNEL(%s);
\n\n
"
,
OUTPUT_DLL_NAME
,
globals
.
input_name
,
OUTPUT_DLL_NAME
,
OUTPUT_DLL_NAME
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment