| Index: src/platform-freebsd.cc
|
| diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc
|
| index ba5967821d27ac43c52c1f4d289ce1f15a6fda5c..a1a07396fb42da4b79328bd76644f517b3c9a566 100644
|
| --- a/src/platform-freebsd.cc
|
| +++ b/src/platform-freebsd.cc
|
| @@ -120,10 +120,11 @@ static unsigned StringToLong(char* buffer) {
|
| }
|
|
|
|
|
| -void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| +std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
|
| + std::vector<SharedLibraryAddress> result;
|
| static const int MAP_LENGTH = 1024;
|
| int fd = open("/proc/self/maps", O_RDONLY);
|
| - if (fd < 0) return;
|
| + if (fd < 0) return result;
|
| while (true) {
|
| char addr_buffer[11];
|
| addr_buffer[0] = '0';
|
| @@ -154,9 +155,10 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) {
|
| // There may be no filename in this line. Skip to next.
|
| if (start_of_path == NULL) continue;
|
| buffer[bytes_read] = 0;
|
| - LOG(isolate, SharedLibraryEvent(start_of_path, start, end));
|
| + result.push_back(SharedLibraryAddress(start_of_path, start, end));
|
| }
|
| close(fd);
|
| + return result;
|
| }
|
|
|
|
|
|
|