Index: src/platform-macos.cc |
diff --git a/src/platform-macos.cc b/src/platform-macos.cc |
index 6535d274b0eac80a9446288946eda1ec0649b4bb..4301875b9b61b77e8f4bdf5972e3870b90e99ede 100644 |
--- a/src/platform-macos.cc |
+++ b/src/platform-macos.cc |
@@ -125,7 +125,8 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() { |
} |
-void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
+std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { |
+ std::vector<SharedLibraryAddress> result; |
unsigned int images_count = _dyld_image_count(); |
for (unsigned int i = 0; i < images_count; ++i) { |
const mach_header* header = _dyld_get_image_header(i); |
@@ -144,9 +145,10 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
if (code_ptr == NULL) continue; |
const uintptr_t slide = _dyld_get_image_vmaddr_slide(i); |
const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide; |
- LOG(isolate, |
- SharedLibraryEvent(_dyld_get_image_name(i), start, start + size)); |
+ result.push_back( |
+ SharedLibraryAddress(_dyld_get_image_name(i), start, start + size)); |
} |
+ return result; |
} |