From: Matt Mullins Date: Sat, 21 Sep 2013 06:14:47 +0000 (-0700) Subject: Print address before dereferencing. X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=aa81d1367d4d37778d86a45af4da25445d3e0a60;p=mmap_everything.git Print address before dereferencing. This way, I can tell what address causes it to segfault! --- 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); } }