From 666a72e39a09d820284bedccc6c5fe712c2e6f08 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Oct 2006 01:00:47 +0000 Subject: [PATCH] r19304: If you really want to look at the contents undef this one (This used to be commit fe20ac404d654abe31729664584391f3b3cd0214) --- source4/lib/talloc/talloc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c index 15b27c61ee2..87b4d51ba4f 100644 --- a/source4/lib/talloc/talloc.c +++ b/source4/lib/talloc/talloc.c @@ -886,6 +886,23 @@ static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_ (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr), (int)talloc_reference_count(ptr)); + +#if 0 + fprintf(f, "content: "); + if (talloc_total_size(ptr)) { + int tot = talloc_total_size(ptr); + int i; + + for (i = 0; i < tot; i++) { + if ((((char *)ptr)[i] > 31) && (((char *)ptr)[i] < 126)) { + fprintf(f, "%c", ((char *)ptr)[i]); + } else { + fprintf(f, "~%02x", ((char *)ptr)[i]); + } + } + } + fprintf(f, "\n"); +#endif } /* -- 2.11.4.GIT