Index: src/platform-cygwin.cc |
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc |
index 35c65c718245e9fa266ce5d559505b283f937b46..91235cfb0aedcc7656b85d8c253dc3764bd1b309 100644 |
--- a/src/platform-cygwin.cc |
+++ b/src/platform-cygwin.cc |
@@ -106,12 +106,13 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() { |
} |
-void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
+std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { |
+ std::vector<SharedLibraryAddresses> result; |
// This function assumes that the layout of the file is as follows: |
// hex_start_addr-hex_end_addr rwxp <unused data> [binary_file_name] |
// If we encounter an unexpected situation we abort scanning further entries. |
FILE* fp = fopen("/proc/self/maps", "r"); |
- if (fp == NULL) return; |
+ if (fp == NULL) return result; |
// Allocate enough room to be able to store a full file name. |
const int kLibNameLen = FILENAME_MAX + 1; |
@@ -150,7 +151,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
snprintf(lib_name, kLibNameLen, |
"%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end); |
} |
- LOG(isolate, SharedLibraryEvent(lib_name, start, end)); |
+ result.push_back(SharedLibraryAddress(lib_name, start, end)); |
} else { |
// Entry not describing executable data. Skip to end of line to set up |
// reading the next entry. |
@@ -162,6 +163,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
} |
free(lib_name); |
fclose(fp); |
+ return result; |
} |