#include "StackTrace.h"
#include "Log.h"
#include "LinkedList.h"
#include "Clients.h"
#include "Thread.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | stackEntry |
struct | threadEntry |
Macros | |
#define | MAX_FUNCTION_NAME_LENGTH 30 |
#define | MAX_STACK_DEPTH 50 |
#define | MAX_THREADS 255 |
Functions | |
int | setStack (int create) |
void | StackTrace_entry (const char *name, int line, enum LOG_LEVELS trace_level) |
void | StackTrace_exit (const char *name, int line, void *rc, enum LOG_LEVELS trace_level) |
char * | StackTrace_get (thread_id_type threadid, char *buf, int bufsize) |
void | StackTrace_printStack (FILE *dest) |
Variables | |
static threadEntry * | my_thread = NULL |
static mutex_type | stack_mutex = &stack_mutex_store |
static pthread_mutex_t | stack_mutex_store = PTHREAD_MUTEX_INITIALIZER |
static int | thread_count = 0 |
static threadEntry | threads [MAX_THREADS] |
#define MAX_FUNCTION_NAME_LENGTH 30 |
Definition at line 43 of file StackTrace.c.
#define MAX_STACK_DEPTH 50 |
Definition at line 42 of file StackTrace.c.
#define MAX_THREADS 255 |
Definition at line 44 of file StackTrace.c.
int setStack | ( | int | create | ) |
Definition at line 80 of file StackTrace.c.
void StackTrace_entry | ( | const char * | name, |
int | line, | ||
enum LOG_LEVELS | trace_level | ||
) |
Definition at line 106 of file StackTrace.c.
void StackTrace_exit | ( | const char * | name, |
int | line, | ||
void * | rc, | ||
enum LOG_LEVELS | trace_level | ||
) |
Definition at line 124 of file StackTrace.c.
char* StackTrace_get | ( | thread_id_type | threadid, |
char * | buf, | ||
int | bufsize | ||
) |
Definition at line 175 of file StackTrace.c.
void StackTrace_printStack | ( | FILE * | dest | ) |
Definition at line 145 of file StackTrace.c.
|
static |
Definition at line 67 of file StackTrace.c.
|
static |
Definition at line 73 of file StackTrace.c.
|
static |
Definition at line 72 of file StackTrace.c.
|
static |
Definition at line 65 of file StackTrace.c.
|
static |
Definition at line 66 of file StackTrace.c.