From fe032edd9cea45ac4220b1983efa30f1bd27535d Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Wed, 16 Aug 2017 15:38:10 -0400 Subject: [PATCH] Add %p to libc's debug printf (#2062) --- app/libc/dbg_printf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/libc/dbg_printf.c b/app/libc/dbg_printf.c index 02ba01a0..90d225ec 100644 --- a/app/libc/dbg_printf.c +++ b/app/libc/dbg_printf.c @@ -120,6 +120,10 @@ reswitch: switch (ch = *fmt++) { va_arg(ap, uint32_t) : va_arg(ap, uint32_t); kprintn(put, ul, 10, width, zwidth); break; + case 'p': + ul = va_arg(ap, ptrdiff_t); + kprintn(put, ul, 16, width, zwidth); + break; case 'x': ul = lflag ? va_arg(ap, uint32_t) : va_arg(ap, uint32_t);