Back to index

plt-scheme  4.2.1
Functions
debug.c File Reference
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void ffi_stop_here (void)
void ffi_assert (char *expr, char *file, int line)
void ffi_type_test (ffi_type *a, char *file, int line)

Function Documentation

void ffi_assert ( char *  expr,
char *  file,
int  line 
)

Definition at line 40 of file debug.c.

{
  fprintf(stderr, "ASSERTION FAILURE: %s at %s:%d\n", expr, file, line);
  ffi_stop_here();
  abort();
}

Here is the call graph for this function:

Definition at line 31 of file debug.c.

{
  /* This function is only useful for debugging purposes.
     Place a breakpoint on ffi_stop_here to be notified of
     significant events. */
}

Here is the caller graph for this function:

void ffi_type_test ( ffi_type *  a,
char *  file,
int  line 
)

Definition at line 49 of file debug.c.

{
  FFI_ASSERT_AT(a != NULL, file, line);

  FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line);
  FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line);
  FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line);
  FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line);

}

Here is the caller graph for this function: