ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
debug.c
Go to the documentation of this file.
1
8
10
11#ifndef NDEBUG
12static const bool default_face_follow_debug_value = false;
13#endif
14
15// clang-format off
17#ifndef NDEBUG
18 {"face-follow-debug", '\0', OPTION_TYPE_BOOL, offsetof(options_t, face_follow_debug),
19 &default_face_follow_debug_value, sizeof(bool), "Outline the selected detected face with a red square (debug builds only).",
20 "DEBUG", NULL, false, "ASCII_CHAT_FACE_FOLLOW_DEBUG", NULL, NULL, false, false,
22
23 {"sync-state",
24 '\0',
26 offsetof(options_t, debug_sync_state_time),
27 &default_debug_sync_state_time_value,
28 sizeof(double),
29 "Print synchronization state and named registry statistics after TIME seconds.",
30 "DEBUG",
31 "TIME",
32 false, // required
33 NULL, // env_var_name
34 NULL, // validate_fn
35 NULL, // parse_fn
36 false, // owns_memory
37 true, // optional_arg
39 {0}, // metadata
40 NULL}, // action_fn
41 {"errno-stacks",
42 '\0',
44 offsetof(options_t, debug_errno_stacks_time),
45 &default_debug_errno_stacks_time_value,
46 sizeof(double),
47 "Print pending errors, handled history, and registry statistics after TIME seconds.",
48 "DEBUG",
49 "TIME",
50 false, // required
51 NULL, // env_var_name
52 NULL, // validate_fn
53 NULL, // parse_fn
54 false, // owns_memory
55 true, // optional_arg
57 {0}, // metadata
58 NULL}, // action_fn
59 {"backtrace",
60 '\0',
62 offsetof(options_t, debug_backtrace_time),
63 &default_debug_backtrace_time_value,
64 sizeof(double),
65 "Print backtrace with optional time offset (debug builds only).",
66 "DEBUG",
67 "TIME",
68 false, // required
69 NULL, // env_var_name
70 NULL, // validate_fn
71 NULL, // parse_fn
72 false, // owns_memory
73 true, // optional_arg
75 {0}, // metadata
76 NULL}, // action_fn
77 {"memory-report",
78 '\0',
80 offsetof(options_t, debug_memory_report_interval),
81 &default_debug_memory_report_interval_value,
82 sizeof(double),
83 "Print memory report periodically at specified interval in seconds (debug builds only).",
84 "DEBUG",
85 "TIME",
86 false, // required
87 NULL, // env_var_name
88 NULL, // validate_fn
89 NULL, // parse_fn
90 false, // owns_memory
91 true, // optional_arg
93 {0}, // metadata
94 NULL}, // action_fn
95
96#endif
98// clang-format on
@ OPTION_TYPE_DOUBLE
Floating point (–ratio 1.5).
Definition builder.h:170
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value).
Definition builder.h:167
const registry_entry_t g_debug_entries[]
Definition debug.c:16
struct options_state options_t
Immutable, RCU-published snapshot of the application's runtime configuration.
@ OPTION_MODE_ALL
All modes + binary.
Definition options.h:946
@ OPTION_MODE_CLIENT
Client mode (bit 1).
Definition options.h:939
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4).
Definition options.h:942
@ OPTION_MODE_MIRROR
Mirror mode (bit 2).
Definition options.h:940
Shared structures and macros for registry implementation.
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
Registry entry - stores option definition with mode bitmask and metadata.