1
0
Fork 0
forked from len0rd/rockbox

buflib: Refactor various debugging features

Gate buflib_get_data() checking, debug printing, and buflib
integrity checks behind individual defines in buflib.h, and
turn them all off by default. If needed, they can be turned
on manually when compiling.

The buflib debug menu is only available if debug printing is
enabled, so after this commit it will no longer be included
in normal builds -- it isn't very useful to end users.

Change-Id: Iab25b7852bc7c5592ce04c9c45762046a87d5bc3
This commit is contained in:
Aidan MacDonald 2023-01-02 19:18:02 +00:00
parent e492b51d83
commit 719d48afc4
7 changed files with 75 additions and 43 deletions

View file

@ -1019,7 +1019,7 @@ void switch_thread(void)
#ifdef RB_PROFILE
profile_thread_stopped(THREAD_ID_SLOT(thread->id));
#endif
#ifdef DEBUG
#ifdef BUFLIB_DEBUG_CHECK_VALID
/* Check core_ctx buflib integrity */
core_check_valid();
#endif