feisty meow concerns codebase  2.140
callstack_tracker.cpp File Reference
#include "callstack_tracker.h"
#include <basis/functions.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for callstack_tracker.cpp:

Go to the source code of this file.

Namespaces

 application
 Implements an application lock to ensure only one is running at once.
 

Macros

#define CHECK_SPACE_IN_BUFFER(desired_chunk)
 

Functions

callstack_tracker & application::thread_wide_stack_trace ()
 the single instance of callstack_tracker. More...
 
void application::update_current_stack_frame_line_number (int line)
 sets the line number for the current frame in the global stack trace. More...
 

Variables

const int application::MAX_STACK_DEPTH = 2000
 
const int application::MAX_TEXT_FIELD = 1024
 
const char * application::emptiness_note = "Empty Stack\n"
 what we show when the stack is empty. More...
 

Macro Definition Documentation

◆ CHECK_SPACE_IN_BUFFER

#define CHECK_SPACE_IN_BUFFER (   desired_chunk)
Value:
/* being slightly paranoid about the space, but we don't want any buffer overflows. */ \
if (space_used_in_buffer + desired_chunk >= full_size_needed - 4) { \
printf("callstack_tracker::full_trace: failure in size estimation--we would have blown out of the buffer"); \
return to_return; \
} else { \
space_used_in_buffer += desired_chunk; \
}

Definition at line 164 of file callstack_tracker.cpp.