diff options
author | Gireesh Punathil <gpunathi@in.ibm.com> | 2018-12-18 05:01:36 -0500 |
---|---|---|
committer | Gireesh Punathil <gpunathi@in.ibm.com> | 2018-12-20 12:16:11 +0530 |
commit | 6f8ccef74ec514292ebf8ee65602d8c109b0aa2b (patch) | |
tree | aa38e4159c916d34ca269df6a661c9c4c7319393 /src | |
parent | 6b7816e22beb74624675c22145032c4767cb1cda (diff) | |
download | android-node-v8-6f8ccef74ec514292ebf8ee65602d8c109b0aa2b.tar.gz android-node-v8-6f8ccef74ec514292ebf8ee65602d8c109b0aa2b.tar.bz2 android-node-v8-6f8ccef74ec514292ebf8ee65602d8c109b0aa2b.zip |
src: port GetLoadedLibraries for freebsd
the dl_iterate_phdr and its associated data structure in Linux
are fully available in freebsd as well, so opening it up for
freebsd means just opening up the platform specific identifiers.
Refs: https://github.com/nodejs/node/pull/24825
PR-URL: https://github.com/nodejs/node/pull/25106
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/debug_utils.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug_utils.cc b/src/debug_utils.cc index 4f086106b6..d9db2d52e0 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -30,9 +30,9 @@ #endif // __POSIX__ -#if defined(__linux__) || defined(__sun) +#if defined(__linux__) || defined(__sun) || defined(__FreeBSD__) #include <link.h> -#endif // (__linux__) || defined(__sun) +#endif // (__linux__) || defined(__sun) || defined(__FreeBSD__) #ifdef __APPLE__ #include <mach-o/dyld.h> // _dyld_get_image_name() @@ -322,7 +322,7 @@ void CheckedUvLoopClose(uv_loop_t* loop) { std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() { std::vector<std::string> list; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dl_iterate_phdr( [](struct dl_phdr_info* info, size_t size, void* data) { auto list = static_cast<std::vector<std::string>*>(data); |