summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/Host.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-10-29 21:48:37 +0000
committerCaroline Tice <ctice@apple.com>2010-10-29 21:48:37 +0000
commit20ad3c40f4693d446ce69feda59a5e91ca0ea3a3 (patch)
tree9ee0d6a6ba4718f97a00a3db80890e9490d94d08 /lldb/source/Host/common/Host.cpp
parent4a0c2d73c3092e0a03223a08cdf4eade3fb8f258 (diff)
downloadbcm5719-llvm-20ad3c40f4693d446ce69feda59a5e91ca0ea3a3.tar.gz
bcm5719-llvm-20ad3c40f4693d446ce69feda59a5e91ca0ea3a3.zip
Add the ability to disable individual log categories, rather
than just the entire log channel. Add checks, where appropriate, to make sure a log channel/category has not been disabled before attempting to write to it. llvm-svn: 117715
Diffstat (limited to 'lldb/source/Host/common/Host.cpp')
-rw-r--r--lldb/source/Host/common/Host.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index ed6a2746099..51702d0e251 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -122,6 +122,7 @@ MonitorChildProcessThreadFunction (void *arg)
struct rusage *rusage = NULL;
while (1)
{
+ log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
log->Printf("%s ::wait4 (pid = %i, &status, options = %i, rusage = %p)...", function, pid, options, rusage);
@@ -170,6 +171,7 @@ MonitorChildProcessThreadFunction (void *arg)
{
ScopedPThreadCancelDisabler pthread_cancel_disabler;
+ log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
log->Printf ("%s ::wait4 (pid = %i, &status, options = %i, rusage = %p) => pid = %i, status = 0x%8.8x (%s), signal = %i, exit_state = %i",
function,
@@ -198,6 +200,7 @@ MonitorChildProcessThreadFunction (void *arg)
}
}
+ log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
log->Printf ("%s (arg = %p) thread exiting...", __FUNCTION__, arg);
OpenPOWER on IntegriCloud