Index: src/platform-qnx.cc |
diff --git a/src/platform-qnx.cc b/src/platform-qnx.cc |
index 19ce8857bfc3253fe50ef05486205a610989d936..3c95650f57a3027a27b1a923e23565c4aa737a35 100644 |
--- a/src/platform-qnx.cc |
+++ b/src/platform-qnx.cc |
@@ -174,7 +174,8 @@ PosixMemoryMappedFile::~PosixMemoryMappedFile() { |
} |
-void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
+std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { |
+ std::vector<SharedLibraryAddress> result; |
procfs_mapinfo *mapinfos = NULL, *mapinfo; |
int proc_fd, num, i; |
@@ -188,20 +189,20 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
if ((proc_fd = open(buf, O_RDONLY)) == -1) { |
close(proc_fd); |
- return; |
+ return result; |
} |
/* Get the number of map entries. */ |
if (devctl(proc_fd, DCMD_PROC_MAPINFO, NULL, 0, &num) != EOK) { |
close(proc_fd); |
- return; |
+ return result; |
} |
mapinfos = reinterpret_cast<procfs_mapinfo *>( |
malloc(num * sizeof(procfs_mapinfo))); |
if (mapinfos == NULL) { |
close(proc_fd); |
- return; |
+ return result; |
} |
/* Fill the map entries. */ |
@@ -209,7 +210,7 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
mapinfos, num * sizeof(procfs_mapinfo), &num) != EOK) { |
free(mapinfos); |
close(proc_fd); |
- return; |
+ return result; |
} |
for (i = 0; i < num; i++) { |
@@ -219,13 +220,13 @@ void OS::LogSharedLibraryAddresses(Isolate* isolate) { |
if (devctl(proc_fd, DCMD_PROC_MAPDEBUG, &map, sizeof(map), 0) != EOK) { |
continue; |
} |
- LOG(isolate, SharedLibraryEvent(map.info.path, |
- mapinfo->vaddr, |
- mapinfo->vaddr + mapinfo->size)); |
+ result.push_back(SharedLibraryAddress( |
+ map.info.path, mapinfo->vaddr, mapinfo->vaddr + mapinfo->size)); |
} |
} |
free(mapinfos); |
close(proc_fd); |
+ return result; |
} |