Open SCAP Library: debug_priv.h File Reference

Open SCAP Library

Macros | Functions | Variables
debug_priv.h File Reference

oscap debug helpers private header More...

`#include <assert.h>`
`#include <stdlib.h>`
`#include <stddef.h>`
`#include <stdarg.h>`
`#include "util.h"`
`#include "public/oscap_debug.h"`

Go to the source code of this file.

## Macros
#define | OSCAP_DEBUG_PRIV_H_
#define | OSCAP_DEBUGOBJ_SEXP 1
#define | _A(x) assert(x)
#define | __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__)
#define | oscap_dlprintf(l, ...) __dlprintf_wrapper (l, __VA_ARGS__)
| Convenience macro for calling __oscap_dlprintf. More...
#define | dO(type, obj) __oscap_debuglog_object(__FILE__, __PRETTY_FUNCTION__, __LINE__, type, obj)
#define | dI(...) oscap_dlprintf(DBG_I, __VA_ARGS__)
#define | dW(...) oscap_dlprintf(DBG_W, __VA_ARGS__)
#define | dE(...) oscap_dlprintf(DBG_E, __VA_ARGS__)
#define | dD(...) oscap_dlprintf(DBG_D, __VA_ARGS__)
#define | dIndent(indent_change) __oscap_dlprintf(DBG_I, __FILE__, __PRETTY_FUNCTION__, __LINE__, indent_change, NULL)

## Functions
void | __oscap_dlprintf (int level, const char *file, const char *fn, size_t line, int delta_indent, const char *fmt,...)
| Version of the oscap_dprintf function with support for debug level. More...
void | __oscap_debuglog_object (const char *file, const char *fn, size_t line, int objtype, void *obj)

## Variables
| OSCAP_HIDDEN_START
| OSCAP_HIDDEN_END

## Detailed Description

oscap debug helpers private header

## Macro Definition Documentation

## ◆ oscap_dlprintf

#define oscap_dlprintf | ( |  | l,
|  |  | ...
| ) |  | __dlprintf_wrapper (l, __VA_ARGS__)

Convenience macro for calling __oscap_dlprintf.

Only the fmt & it's arguments need to be specified. The FILE, PRETTY_FUNCTION and LINE macros are used for the first three arguments.

## Function Documentation

## ◆ __oscap_dlprintf()

void __oscap_dlprintf | ( | int | level,
|  | const char * | file,
|  | const char * | fn,
|  | size_t | line,
|  | int | delta_indent,
|  | const char * | fmt,
|  |  | ...
| ) |  |

Version of the oscap_dprintf function with support for debug level.

Uses logic similar to the debug() macro described above.

Parameters

  level | debug level
  file | name of the source file
  fn | name of the function
  line | current line
  delta_indent | changes indentation
  fmt | printf-line format string
  ... | __oscap_dlprintf parameters