[llvm-commits] [compiler-rt] r151139 - /compiler-rt/trunk/lib/asan/asan_procmaps.h
Alexander Potapenko
glider at google.com
Wed Feb 22 00:13:47 PST 2012
Author: glider
Date: Wed Feb 22 02:13:47 2012
New Revision: 151139
URL: http://llvm.org/viewvc/llvm-project?rev=151139&view=rev
Log:
Add AsanProcMaps::Dump()
Modified:
compiler-rt/trunk/lib/asan/asan_procmaps.h
Modified: compiler-rt/trunk/lib/asan/asan_procmaps.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_procmaps.h?rev=151139&r1=151138&r2=151139&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_procmaps.h (original)
+++ compiler-rt/trunk/lib/asan/asan_procmaps.h Wed Feb 22 02:13:47 2012
@@ -28,6 +28,19 @@
// address 'addr'. Returns true on success.
bool GetObjectNameAndOffset(uintptr_t addr, uintptr_t *offset,
char filename[], size_t filename_size);
+ void Dump() {
+ Reset();
+ uintptr_t start, end;
+ const intptr_t kBufSize = 4095;
+ char filename[kBufSize];
+ Report("Process memory map follows:\n");
+ while (Next(&start, &end, /* file_offset */NULL,
+ filename, kBufSize)) {
+ Printf("\t%p-%p\t%s\n", (void*)start, (void*)end, filename);
+ }
+ Report("End of process memory map.\n");
+ }
+
~AsanProcMaps();
private:
// Default implementation of GetObjectNameAndOffset.
More information about the llvm-commits
mailing list