xtd_c - Reference Guide 0.2.0
current_stack_frame.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include "../types.h"
8 #include <stdio.h>
9 
11 #define __CURRENT_STACK_FRAME_FILE_NAME__ (1024)
12 #define __CURRENT_STACK_FRAME_METHOD_NAME__ (256)
13 
15 #define XTD_CURRENT_STACK_FRAME_OFFSET_UNKNOWN UINT_FAST32_MAX
16 
24  const char* file_name;
25  uint32_t file_line_number;
26  const char* method_name;
27 
28 };
29 
31 typedef struct xtd_diagnostics_current_stack_frame xtd_diagnostics_current_stack_frame;
32 
33 #define current_stack_frame_ \
34 ((xtd_diagnostics_current_stack_frame){__FILE__, __LINE__, __func__})
35 
36 #define csf_ \
37 current_stack_frame_
38 
44 xtd_diagnostics_current_stack_frame xtd_diagnostics_current_stack_frame_empty();
55 bool xtd_diagnostics_current_stack_frame_is_empty(xtd_diagnostics_current_stack_frame stack_frame);
56 const char* xtd_diagnostics_current_stack_frame_to_string(xtd_diagnostics_current_stack_frame value);
57 size_t xtd_diagnostics_current_stack_frame_to_string_s(xtd_diagnostics_current_stack_frame value, char* string, size_t size);
Defines the stack_frame object.
Definition: current_stack_frame.h:23