assertions.c File Reference

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <isc/assertions.h>
#include <isc/backtrace.h>
#include <isc/msgs.h>
#include <isc/result.h>

Go to the source code of this file.

Defines

#define BACKTRACE_MAXFRAME   128

Functions

static void default_callback (const char *, int, isc_assertiontype_t, const char *)
 Forward.
void isc_assertion_failed (const char *file, int line, isc_assertiontype_t type, const char *cond)
 Public.
void isc_assertion_setcallback (isc_assertioncallback_t cb)
 Set callback.
const char * isc_assertion_typetotext (isc_assertiontype_t type)
 Type to Text.

Variables

static isc_assertioncallback_t isc_assertion_failed_cb = default_callback


Detailed Description

Definition in file assertions.c.


Define Documentation

#define BACKTRACE_MAXFRAME   128

Definition at line 36 of file assertions.c.

Referenced by assertion_failed(), and default_callback().


Function Documentation

static void default_callback ( const char *  file,
int  line,
isc_assertiontype_t  type,
const char *  cond 
) [static]

Forward.

Definition at line 105 of file assertions.c.

References BACKTRACE_MAXFRAME, isc_assertion_typetotext(), isc_backtrace_getsymbol(), isc_backtrace_gettrace(), ISC_MSG_FAILED, isc_msgcat_get(), ISC_MSGSET_GENERAL, and ISC_R_SUCCESS.

Referenced by isc_assertion_setcallback().

void isc_assertion_failed ( const char *  file,
int  line,
isc_assertiontype_t  type,
const char *  cond 
)

Public.

assertion failed handler

Definition at line 54 of file assertions.c.

References isc_assertion_failed_cb.

void isc_assertion_setcallback ( isc_assertioncallback_t  cb  ) 

Set callback.

Definition at line 64 of file assertions.c.

References default_callback(), and isc_assertion_failed_cb.

Referenced by addrdataset(), allrdatasets(), assertion_failed(), attachversion(), closeversion(), deleterdataset(), dump(), find(), findrdataset(), getnsec3parameters(), main(), resigned(), and subtract().

const char* isc_assertion_typetotext ( isc_assertiontype_t  type  ) 

Type to Text.

Definition at line 73 of file assertions.c.

References isc_assertiontype_ensure, isc_assertiontype_insist, isc_assertiontype_invariant, and isc_assertiontype_require.

Referenced by assertion_failed(), and default_callback().


Variable Documentation

isc_assertioncallback_t isc_assertion_failed_cb = default_callback [static]

Definition at line 45 of file assertions.c.

Referenced by isc_assertion_failed(), and isc_assertion_setcallback().


Generated on Tue Apr 28 17:41:14 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha