From aa81d1367d4d37778d86a45af4da25445d3e0a60 Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Fri, 20 Sep 2013 23:14:47 -0700 Subject: [PATCH] Print address before dereferencing. This way, I can tell what address causes it to segfault! --- mmap_everything.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmap_everything.c b/mmap_everything.c index 8cd4646..a1b4b77 100644 --- a/mmap_everything.c +++ b/mmap_everything.c @@ -56,6 +56,7 @@ int main() { pvalue &= 0x00007FFFFFFFFFF0; int *pi = (void*)(pvalue); - printf("*%p = %x\n", (void*)pi, *pi); + printf("*%p = ", (void*)pi); + printf("%x\n", *pi); } } -- 2.11.0