From 6ba508507ed8fde28d1e811db34e693af5b5ab6f Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 3 Nov 2010 04:08:06 +0000 Subject: Fixed shared library unloads when the unloaded library doesn't come off the end of the list. We had an issue in the MacOSX dynamic loader where if we had shlibs: 1 - a.out 2 - a.dylib 3 - b.dylib And then a.dylib got unloaded, we would unload b.dylib due to the assumption that only shared libraries could come off the end of the list. We now properly search and find which ones get loaded. Added a new internal logging category for the "lldb" log channel named "dyld". This should allow all dynamic loaders to use this as a generic log channel so we can track shared library loads and unloads in the logs without having to have each plug-in make up its own logging channel. llvm-svn: 118147 --- lldb/source/lldb-log.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/lldb-log.cpp') diff --git a/lldb/source/lldb-log.cpp b/lldb/source/lldb-log.cpp index a7ba32801f1..dcda478281c 100644 --- a/lldb/source/lldb-log.cpp +++ b/lldb/source/lldb-log.cpp @@ -124,6 +124,7 @@ lldb_private::DisableLog (Args &args, Stream *feedback_strm) else if (strcasecmp(arg, "api") == 0) flag_bits &= ~LIBLLDB_LOG_API; else if (strcasestr(arg, "break") == arg) flag_bits &= ~LIBLLDB_LOG_BREAKPOINTS; else if (strcasecmp(arg, "default") == 0 ) flag_bits &= ~LIBLLDB_LOG_DEFAULT; + else if (strcasecmp(arg, "dyld") == 0 ) flag_bits &= ~LIBLLDB_LOG_DYNAMIC_LOADER; else if (strcasestr(arg, "event") == arg) flag_bits &= ~LIBLLDB_LOG_EVENTS; else if (strcasestr(arg, "expr") == arg) flag_bits &= ~LIBLLDB_LOG_EXPRESSIONS; else if (strcasestr(arg, "object") == arg) flag_bits &= ~LIBLLDB_LOG_OBJECT; @@ -182,6 +183,7 @@ lldb_private::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, Args &ar else if (strcasecmp(arg, "api") == 0) flag_bits |= LIBLLDB_LOG_API; else if (strcasestr(arg, "break") == arg) flag_bits |= LIBLLDB_LOG_BREAKPOINTS; else if (strcasecmp(arg, "default") == 0 ) flag_bits |= LIBLLDB_LOG_DEFAULT; + else if (strcasecmp(arg, "dyld") == 0 ) flag_bits |= LIBLLDB_LOG_DYNAMIC_LOADER; else if (strcasestr(arg, "event") == arg) flag_bits |= LIBLLDB_LOG_EVENTS; else if (strcasestr(arg, "expr") == arg) flag_bits |= LIBLLDB_LOG_EXPRESSIONS; else if (strcasestr(arg, "object") == arg) flag_bits |= LIBLLDB_LOG_OBJECT; -- cgit v1.2.3