#26337·radare2

Kill r_cons_gprintf

Author: trufaeCreated Jul 23, 2026Updated Aug 22, 2026

This must be removed before 6.2.0 release. its a bad api using global variables and it was there just for transitional reasons. the apis using them will need refactoring, or redesigning to have access to an RCons pointer

libr/cons/cons.c:R_API int r_cons_gprintf(const char *format, ...) {
libr/cons/stiv.c:	do_render (renderer, r_cons_gprintf, buf, bufsz, width, height, components);
libr/core/cbin.c:	pdb.cb_printf = r_cons_gprintf;
libr/core/core.c:	core->anal->cb_printf = (void *)r_cons_gprintf;
libr/core/core.c:	core->bin->cb_printf = (PrintfCallback)r_cons_gprintf;
libr/core/core.c:	core->io->cb_printf = r_cons_gprintf;
libr/core/core.c:	core->dbg->cb_printf = r_cons_gprintf;
libr/include/r_cons.h:R_API int r_cons_gprintf(const char *format, ...) R_PRINTF_CHECK(1, 2);
libr/include/r_heap_glibc.h:#define PRINTF_A(color, fmt , ...) r_cons_gprintf (color fmt Color_RESET, __VA_ARGS__)
libr/include/r_heap_glibc.h:#define PRINT_YA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->addr)
libr/include/r_heap_glibc.h:#define PRINT_GA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->args)
libr/include/r_heap_glibc.h:#define PRINT_BA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->num)
libr/include/r_heap_glibc.h:#define PRINT_RA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->invalid)
libr/include/r_heap_jemalloc.h:#define PRINTF_A(color, fmt , ...) r_cons_gprintf (color fmt Color_RESET, __VA_ARGS__)
libr/include/r_heap_jemalloc.h:#define PRINT_YA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->addr)
libr/include/r_heap_jemalloc.h:#define PRINT_GA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->args)
libr/include/r_heap_jemalloc.h:#define PRINT_BA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->num)
libr/include/r_heap_jemalloc.h:#define PRINT_RA(msg) r_cons_gprintf ("%s" msg Color_RESET, pal->invalid)
libr/lang/p/spp_r2.inc.c:		r_cons_gprintf ("%s", var);
libr/lang/p/spp_r2.inc.c:	r_cons_gprintf ("%d", max);
libr/lang/p/spp_r2.inc.c:		r_cons_gprintf ("%s", buf);
libr/main/rabin2.c:	bin->cb_printf = r_cons_gprintf; // XXX deprecate
test/unit/test_pdb.c:	pdb->cb_printf = r_cons_gprintf;
test/unit/test_pdb.c:	pdb->cb_printf = r_cons_gprintf;