debug(3)
π debug(3) β Debug Macros π
okay bestie, welcome to the debug page β it's a Library Functions Manual situation, and it's literally all about the debug macros, no cap. it's giving "tiny page, big attitude," and honestly? we're obsessed. π
π¦ SYNOPSIS π¦
β¨ Macros β¨
#define MDB_DEBUG 0
#define MDB_DBG_INFO 1
#define MDB_DBG_TRACE 2
#define DPRINTF(args)
#define MDB_TRACE(args)
#define DPUTS(arg)
#define DDBI(mc)
πΈ Detailed Description πΈ
so likeβ¦ there is a section called Detailed Description, and bestie, it's serving absolutely nothing β no body text, just a heading living its truth. iconic behavior honestly. π everything juicy lives down in the macro docs, so let's go. π«Ά
π Macro Definition Documentation π
π #define MDB_DEBUG 0
this is THE switch, the main character. it enables debug output. β
- it needs variable argument macros (that's a C99 feature, iykyk β so like, make sure your compiler is not doing the most ancient thing).
- set it to 1 for copious tracing (copious!! the tracing is unhinged and we love that).
- set it to 2 to add dumps of all the IDLs read from and written to the database β and yes, that includes the ones used for free space management.
fr fr, pick your number on purpose. 1 is chatty, 2 is chatty and dumping every IDL in sight. π
πΌ #define DPRINTF(args)
Value:
((void) 0)
ngl, that's the whole thing. that's the value. it's a no-op and it's not even sorry about it. π
π§ #define MDB_TRACE(args)
Value:
((void) 0)
same energy as its bestie above: does absolutely nothing, slays while doing it. β¨
π #define DPUTS(arg)
Value:
DPRINTF(("%s", arg))
okay so what this does: it prints a debug string. and here's the important part β the string gets printed literally, with no format processing at all. so like, no sneaky % surprises, it just says what it says. π
π¦ #define DDBI(mc)
Value:
(((mc)->mc_flags & C_SUB) ? -(int)(mc)->mc_dbi : (int)(mc)->mc_dbi)
this one is the debugging output value of a cursor DBI, and here's the lil plot twist: it comes out negative in a sub-cursor. so if you're staring at a negative number and spiraling, that's not a bug, bestie, that's the sub-cursor flag doing its thing. ππ₯
π« Author π«
Generated automatically by Doxygen for LMDB from the source code. (so like, nobody hand-wrote this, the robots did it, and they ate. π€β¨)
<div align="center">πΈππ¦β¨π</div>
and that's the whole page, bestie β brought to you by the fine folks at LMDB, filed under debug(3) in the good ol' Library Functions Manual. mwah, ily, go drink some water and check your MDB_DEBUG value. π
π«Άπ
π¦ where this page comes from
- ubuntu stonking: lmdb-doc 0.9.35-1 Β· OpenLDAP-2.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms