SDL 3.0
SDL_assert.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * # CategoryAssert
24 *
25 * A helpful assertion macro!
26 *
27 * SDL assertions operate like your usual `assert` macro, but with some added
28 * features:
29 *
30 * - It uses a trick with the `sizeof` operator, so disabled assertions
31 * vaporize out of the compiled code, but variables only referenced in the
32 * assertion won't trigger compiler warnings about being unused.
33 * - It is safe to use with a dangling-else: `if (x) SDL_assert(y); else
34 * do_something();`
35 * - It works the same everywhere, instead of counting on various platforms'
36 * compiler and C runtime to behave.
37 * - It provides multiple levels of assertion (SDL_assert, SDL_assert_release,
38 * SDL_assert_paranoid) instead of a single all-or-nothing option.
39 * - It offers a variety of responses when an assertion fails (retry, trigger
40 * the debugger, abort the program, ignore the failure once, ignore it for
41 * the rest of the program's run).
42 * - It tries to show the user a dialog by default, if possible, but the app
43 * can provide a callback to handle assertion failures however they like.
44 * - It lets failed assertions be retried. Perhaps you had a network failure
45 * and just want to retry the test after plugging your network cable back
46 * in? You can.
47 * - It lets the user ignore an assertion failure, if there's a harmless
48 * problem that one can continue past.
49 * - It lets the user mark an assertion as ignored for the rest of the
50 * program's run; if there's a harmless problem that keeps popping up.
51 * - It provides statistics and data on all failed assertions to the app.
52 * - It allows the default assertion handler to be controlled with environment
53 * variables, in case an automated script needs to control it.
54 *
55 * To use it: do a debug build and just sprinkle around tests to check your
56 * code!
57 */
58
59#ifndef SDL_assert_h_
60#define SDL_assert_h_
61
62#include <SDL3/SDL_stdinc.h>
63
64#include <SDL3/SDL_begin_code.h>
65/* Set up for C function definitions, even when using C++ */
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70#ifdef SDL_WIKI_DOCUMENTATION_SECTION
71
72/**
73 * The level of assertion aggressiveness.
74 *
75 * This value changes depending on compiler options and other preprocessor
76 * defines.
77 *
78 * It is currently one of the following values, but future SDL releases might
79 * add more:
80 *
81 * - 0: All SDL assertion macros are disabled.
82 * - 1: Release settings: SDL_assert disabled, SDL_assert_release enabled.
83 * - 2: Debug settings: SDL_assert and SDL_assert_release enabled.
84 * - 3: Paranoid settings: All SDL assertion macros enabled, including
85 * SDL_assert_paranoid.
86 *
87 * \since This macro is available since SDL 3.0.0.
88 */
89#define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors
90
91#elif !defined(SDL_ASSERT_LEVEL)
92#ifdef SDL_DEFAULT_ASSERT_LEVEL
93#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
94#elif defined(_DEBUG) || defined(DEBUG) || \
95 (defined(__GNUC__) && !defined(__OPTIMIZE__))
96#define SDL_ASSERT_LEVEL 2
97#else
98#define SDL_ASSERT_LEVEL 1
99#endif
100#endif
101
102#ifdef SDL_WIKI_DOCUMENTATION_SECTION
103
104/**
105 * Attempt to tell an attached debugger to pause.
106 *
107 * This allows an app to programmatically halt ("break") the debugger as if it
108 * had hit a breakpoint, allowing the developer to examine program state, etc.
109 *
110 * This is a macro--not a function--so that the debugger breaks on the source
111 * code line that used SDL_TriggerBreakpoint and not in some random guts of
112 * SDL. SDL_assert uses this macro for the same reason.
113 *
114 * If the program is not running under a debugger, SDL_TriggerBreakpoint will
115 * likely terminate the app, possibly without warning. If the current platform
116 * isn't supported (SDL doesn't know how to trigger a breakpoint), this macro
117 * does nothing.
118 *
119 * \threadsafety It is safe to call this function from any thread.
120 *
121 * \since This macro is available since SDL 3.0.0.
122 */
123#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
124
125#elif defined(_MSC_VER)
126 /* Don't include intrin.h here because it contains C++ code */
127 extern void __cdecl __debugbreak(void);
128 #define SDL_TriggerBreakpoint() __debugbreak()
129#elif defined(ANDROID)
130 #include <assert.h>
131 #define SDL_TriggerBreakpoint() assert(0)
132#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
133 #define SDL_TriggerBreakpoint() __builtin_debugtrap()
134#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
135 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
136#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
137 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
138#elif ( defined(SDL_PLATFORM_APPLE) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
139 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
140#elif defined(SDL_PLATFORM_APPLE) && defined(__arm__)
141 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
142#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
143 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
144#elif defined(__386__) && defined(__WATCOMC__)
145 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
146#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
147 #include <signal.h>
148 #define SDL_TriggerBreakpoint() raise(SIGTRAP)
149#else
150 /* How do we trigger breakpoints on this platform? */
151 #define SDL_TriggerBreakpoint()
152#endif
153
154#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
155# define SDL_FUNCTION __func__
156#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
157# define SDL_FUNCTION __FUNCTION__
158#else
159# define SDL_FUNCTION "???"
160#endif
161#define SDL_FILE __FILE__
162#define SDL_LINE __LINE__
163
164/*
165sizeof (x) makes the compiler still parse the expression even without
166assertions enabled, so the code is always checked at compile time, but
167doesn't actually generate code for it, so there are no side effects or
168expensive checks at run time, just the constant size of what x WOULD be,
169which presumably gets optimized out as unused.
170This also solves the problem of...
171
172 int somevalue = blah();
173 SDL_assert(somevalue == 1);
174
175...which would cause compiles to complain that somevalue is unused if we
176disable assertions.
177*/
178
179/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
180 this condition isn't constant. And looks like an owl's face! */
181#ifdef _MSC_VER /* stupid /W4 warnings. */
182#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
183#else
184#define SDL_NULL_WHILE_LOOP_CONDITION (0)
185#endif
186
187#define SDL_disabled_assert(condition) \
188 do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
189
190/**
191 * Possible outcomes from a triggered assertion.
192 *
193 * When an enabled assertion triggers, it may call the assertion handler
194 * (possibly one provided by the app via SDL_SetAssertionHandler), which will
195 * return one of these values, possibly after asking the user.
196 *
197 * Then SDL will respond based on this outcome (loop around to retry the
198 * condition, try to break in a debugger, kill the program, or ignore the
199 * problem).
200 *
201 * \since This enum is available since SDL 3.0.0.
202 */
203typedef enum SDL_AssertState
204{
205 SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
206 SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
207 SDL_ASSERTION_ABORT, /**< Terminate the program. */
208 SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
209 SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
211
212/**
213 * Information about an assertion failure.
214 *
215 * This structure is filled in with information about a triggered assertion,
216 * used by the assertion handler, then added to the assertion report. This is
217 * returned as a linked list from SDL_GetAssertionReport().
218 *
219 * \since This struct is available since SDL 3.0.0.
220 */
221typedef struct SDL_AssertData
222{
223 SDL_bool always_ignore; /**< SDL_TRUE if app should always continue when assertion is triggered. */
224 unsigned int trigger_count; /**< Number of times this assertion has been triggered. */
225 const char *condition; /**< A string of this assert's test code. */
226 const char *filename; /**< The source file where this assert lives. */
227 int linenum; /**< The line in `filename` where this assert lives. */
228 const char *function; /**< The name of the function where this assert lives. */
229 const struct SDL_AssertData *next; /**< next item in the linked list. */
231
232/**
233 * Never call this directly.
234 *
235 * Use the SDL_assert* macros instead.
236 *
237 * \param data assert data structure.
238 * \param func function name.
239 * \param file file name.
240 * \param line line number.
241 * \returns assert state.
242 *
243 * \since This function is available since SDL 3.0.0.
244 */
245extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
246 const char *func,
247 const char *file, int line) SDL_ANALYZER_NORETURN;
248
249/* Define the trigger breakpoint call used in asserts */
250#ifndef SDL_AssertBreakpoint
251#if defined(ANDROID) && defined(assert)
252/* Define this as empty in case assert() is defined as SDL_assert */
253#define SDL_AssertBreakpoint()
254#else
255#define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
256#endif
257#endif /* !SDL_AssertBreakpoint */
258
259/* the do {} while(0) avoids dangling else problems:
260 if (x) SDL_assert(y); else blah();
261 ... without the do/while, the "else" could attach to this macro's "if".
262 We try to handle just the minimum we need here in a macro...the loop,
263 the static vars, and break points. The heavy lifting is handled in
264 SDL_ReportAssertion(), in SDL_assert.c.
265*/
266#define SDL_enabled_assert(condition) \
267 do { \
268 while ( !(condition) ) { \
269 static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
270 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
271 if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
272 continue; /* go again. */ \
273 } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
274 SDL_AssertBreakpoint(); \
275 } \
276 break; /* not retrying. */ \
277 } \
278 } while (SDL_NULL_WHILE_LOOP_CONDITION)
279
280#ifdef SDL_WIKI_DOCUMENTATION_SECTION
281
282/**
283 * An assertion test that is normally performed only in debug builds.
284 *
285 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 2, otherwise it is
286 * disabled. This is meant to only do these tests in debug builds, so they can
287 * tend to be more expensive, and they are meant to bring everything to a halt
288 * when they fail, with the programmer there to assess the problem.
289 *
290 * In short: you can sprinkle these around liberally and assume they will
291 * evaporate out of the build when building for end-users.
292 *
293 * When assertions are disabled, this wraps `condition` in a `sizeof`
294 * operator, which means any function calls and side effects will not run, but
295 * the compiler will not complain about any otherwise-unused variables that
296 * are only referenced in the assertion.
297 *
298 * One can set the environment variable "SDL_ASSERT" to one of several strings
299 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
300 * behavior, which may be desirable for automation purposes. If your platform
301 * requires GUI interfaces to happen on the main thread but you're debugging
302 * an assertion in a background thread, it might be desirable to set this to
303 * "break" so that your debugger takes control as soon as assert is triggered,
304 * instead of risking a bad UI interaction (deadlock, etc) in the application.
305 *
306 * \param condition boolean value to test.
307 *
308 * \since This macro is available since SDL 3.0.0.
309 */
310#define SDL_assert(condition) if (assertion_enabled && (condition)) { trigger_assertion; }
311
312/**
313 * An assertion test that is performed even in release builds.
314 *
315 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 1, otherwise it is
316 * disabled. This is meant to be for tests that are cheap to make and
317 * extremely unlikely to fail; generally it is frowned upon to have an
318 * assertion failure in a release build, so these assertions generally need to
319 * be of more than life-and-death importance if there's a chance they might
320 * trigger. You should almost always consider handling these cases more
321 * gracefully than an assert allows.
322 *
323 * When assertions are disabled, this wraps `condition` in a `sizeof`
324 * operator, which means any function calls and side effects will not run, but
325 * the compiler will not complain about any otherwise-unused variables that
326 * are only referenced in the assertion.
327 *
328 * One can set the environment variable "SDL_ASSERT" to one of several strings
329 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
330 * behavior, which may be desirable for automation purposes. If your platform
331 * requires GUI interfaces to happen on the main thread but you're debugging
332 * an assertion in a background thread, it might be desirable to set this to
333 * "break" so that your debugger takes control as soon as assert is triggered,
334 * instead of risking a bad UI interaction (deadlock, etc) in the application.
335 * *
336 *
337 * \param condition boolean value to test.
338 *
339 * \since This macro is available since SDL 3.0.0.
340 */
341#define SDL_assert_release(condition) SDL_disabled_assert(condition)
342
343/**
344 * An assertion test that is performed only when built with paranoid settings.
345 *
346 * This macro is enabled when the SDL_ASSERT_LEVEL is >= 3, otherwise it is
347 * disabled. This is a higher level than both release and debug, so these
348 * tests are meant to be expensive and only run when specifically looking for
349 * extremely unexpected failure cases in a special build.
350 *
351 * When assertions are disabled, this wraps `condition` in a `sizeof`
352 * operator, which means any function calls and side effects will not run, but
353 * the compiler will not complain about any otherwise-unused variables that
354 * are only referenced in the assertion.
355 *
356 * One can set the environment variable "SDL_ASSERT" to one of several strings
357 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
358 * behavior, which may be desirable for automation purposes. If your platform
359 * requires GUI interfaces to happen on the main thread but you're debugging
360 * an assertion in a background thread, it might be desirable to set this to
361 * "break" so that your debugger takes control as soon as assert is triggered,
362 * instead of risking a bad UI interaction (deadlock, etc) in the application.
363 *
364 * \param condition boolean value to test.
365 *
366 * \since This macro is available since SDL 3.0.0.
367 */
368#define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
369
370/* Enable various levels of assertions. */
371#elif SDL_ASSERT_LEVEL == 0 /* assertions disabled */
372# define SDL_assert(condition) SDL_disabled_assert(condition)
373# define SDL_assert_release(condition) SDL_disabled_assert(condition)
374# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
375#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
376# define SDL_assert(condition) SDL_disabled_assert(condition)
377# define SDL_assert_release(condition) SDL_enabled_assert(condition)
378# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
379#elif SDL_ASSERT_LEVEL == 2 /* debug settings. */
380# define SDL_assert(condition) SDL_enabled_assert(condition)
381# define SDL_assert_release(condition) SDL_enabled_assert(condition)
382# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
383#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
384# define SDL_assert(condition) SDL_enabled_assert(condition)
385# define SDL_assert_release(condition) SDL_enabled_assert(condition)
386# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
387#else
388# error Unknown assertion level.
389#endif
390
391/**
392 * An assertion test that always performed.
393 *
394 * This macro is always enabled no matter what SDL_ASSERT_LEVEL is set to. You
395 * almost never want to use this, as it could trigger on an end-user's system,
396 * crashing your program.
397 *
398 * One can set the environment variable "SDL_ASSERT" to one of several strings
399 * ("abort", "break", "retry", "ignore", "always_ignore") to force a default
400 * behavior, which may be desirable for automation purposes. If your platform
401 * requires GUI interfaces to happen on the main thread but you're debugging
402 * an assertion in a background thread, it might be desirable to set this to
403 * "break" so that your debugger takes control as soon as assert is triggered,
404 * instead of risking a bad UI interaction (deadlock, etc) in the application.
405 *
406 * \param condition boolean value to test.
407 *
408 * \since This macro is available since SDL 3.0.0.
409 */
410#define SDL_assert_always(condition) SDL_enabled_assert(condition)
411
412
413/**
414 * A callback that fires when an SDL assertion fails.
415 *
416 * \param data a pointer to the SDL_AssertData structure corresponding to the
417 * current assertion.
418 * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler().
419 * \returns an SDL_AssertState value indicating how to handle the failure.
420 *
421 * \since This datatype is available since SDL 3.0.0.
422 */
424 const SDL_AssertData *data, void *userdata);
425
426/**
427 * Set an application-defined assertion handler.
428 *
429 * This function allows an application to show its own assertion UI and/or
430 * force the response to an assertion failure. If the application doesn't
431 * provide this, SDL will try to do the right thing, popping up a
432 * system-specific GUI dialog, and probably minimizing any fullscreen windows.
433 *
434 * This callback may fire from any thread, but it runs wrapped in a mutex, so
435 * it will only fire from one thread at a time.
436 *
437 * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
438 *
439 * \param handler the SDL_AssertionHandler function to call when an assertion
440 * fails or NULL for the default handler.
441 * \param userdata a pointer that is passed to `handler`.
442 *
443 * \since This function is available since SDL 3.0.0.
444 *
445 * \sa SDL_GetAssertionHandler
446 */
447extern SDL_DECLSPEC void SDLCALL SDL_SetAssertionHandler(
448 SDL_AssertionHandler handler,
449 void *userdata);
450
451/**
452 * Get the default assertion handler.
453 *
454 * This returns the function pointer that is called by default when an
455 * assertion is triggered. This is an internal function provided by SDL, that
456 * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
457 * provide a different function.
458 *
459 * \returns the default SDL_AssertionHandler that is called when an assert
460 * triggers.
461 *
462 * \since This function is available since SDL 3.0.0.
463 *
464 * \sa SDL_GetAssertionHandler
465 */
466extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
467
468/**
469 * Get the current assertion handler.
470 *
471 * This returns the function pointer that is called when an assertion is
472 * triggered. This is either the value last passed to
473 * SDL_SetAssertionHandler(), or if no application-specified function is set,
474 * is equivalent to calling SDL_GetDefaultAssertionHandler().
475 *
476 * The parameter `puserdata` is a pointer to a void*, which will store the
477 * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
478 * will always be NULL for the default handler. If you don't care about this
479 * data, it is safe to pass a NULL pointer to this function to ignore it.
480 *
481 * \param puserdata pointer which is filled with the "userdata" pointer that
482 * was passed to SDL_SetAssertionHandler().
483 * \returns the SDL_AssertionHandler that is called when an assert triggers.
484 *
485 * \since This function is available since SDL 3.0.0.
486 *
487 * \sa SDL_SetAssertionHandler
488 */
489extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
490
491/**
492 * Get a list of all assertion failures.
493 *
494 * This function gets all assertions triggered since the last call to
495 * SDL_ResetAssertionReport(), or the start of the program.
496 *
497 * The proper way to examine this data looks something like this:
498 *
499 * ```c
500 * const SDL_AssertData *item = SDL_GetAssertionReport();
501 * while (item) {
502 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
503 * item->condition, item->function, item->filename,
504 * item->linenum, item->trigger_count,
505 * item->always_ignore ? "yes" : "no");
506 * item = item->next;
507 * }
508 * ```
509 *
510 * \returns a list of all failed assertions or NULL if the list is empty. This
511 * memory should not be modified or freed by the application.
512 *
513 * \since This function is available since SDL 3.0.0.
514 *
515 * \sa SDL_ResetAssertionReport
516 */
517extern SDL_DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
518
519/**
520 * Clear the list of all assertion failures.
521 *
522 * This function will clear the list of all assertions triggered up to that
523 * point. Immediately following this call, SDL_GetAssertionReport will return
524 * no items. In addition, any previously-triggered assertions will be reset to
525 * a trigger_count of zero, and their always_ignore state will be false.
526 *
527 * \since This function is available since SDL 3.0.0.
528 *
529 * \sa SDL_GetAssertionReport
530 */
531extern SDL_DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
532
533/* Ends C function definitions when using C++ */
534#ifdef __cplusplus
535}
536#endif
537#include <SDL3/SDL_close_code.h>
538
539#endif /* SDL_assert_h_ */
SDL_AssertState
Definition SDL_assert.h:204
@ SDL_ASSERTION_RETRY
Definition SDL_assert.h:205
@ SDL_ASSERTION_ABORT
Definition SDL_assert.h:207
@ SDL_ASSERTION_IGNORE
Definition SDL_assert.h:208
@ SDL_ASSERTION_BREAK
Definition SDL_assert.h:206
@ SDL_ASSERTION_ALWAYS_IGNORE
Definition SDL_assert.h:209
SDL_AssertState(* SDL_AssertionHandler)(const SDL_AssertData *data, void *userdata)
Definition SDL_assert.h:423
SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data, const char *func, const char *file, int line) SDL_ANALYZER_NORETURN
const SDL_AssertData * SDL_GetAssertionReport(void)
void SDL_ResetAssertionReport(void)
void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata)
SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void)
SDL_AssertionHandler SDL_GetAssertionHandler(void **puserdata)
#define SDL_ANALYZER_NORETURN
bool SDL_bool
Definition SDL_stdinc.h:301
const struct SDL_AssertData * next
Definition SDL_assert.h:229
unsigned int trigger_count
Definition SDL_assert.h:224
const char * function
Definition SDL_assert.h:228
SDL_bool always_ignore
Definition SDL_assert.h:223
const char * filename
Definition SDL_assert.h:226
const char * condition
Definition SDL_assert.h:225