| Index: src/platform-openbsd.cc
|
| diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc
|
| index c0b5aae6d4539aab02ff8e42eab6f41c8da7e521..1f8e239cd534474591095d006156874dc9656c74 100644
|
| --- a/src/platform-openbsd.cc
|
| +++ b/src/platform-openbsd.cc
|
| @@ -113,12 +113,13 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() {
|
| }
|
|
|
|
|
| -void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| +std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
|
| + std::vector<SharedLibraryAddress> 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;
|
| @@ -157,7 +158,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.
|
| @@ -169,6 +170,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| }
|
| free(lib_name);
|
| fclose(fp);
|
| + return result;
|
| }
|
|
|
|
|
|
|