<div dir="ltr"><div>void</div><div>Log::VAPrintf(const char *format, va_list args)</div><div>{</div><div>    // Make a copy of our stream shared pointer in case someone disables our</div><div>    // log while we are logging and releases the stream</div><div>    StreamSP stream_sp(m_stream_sp);</div><div>    if (stream_sp)</div><div>    {</div><div>        static uint32_t g_sequence_id = 0;</div><div>        StreamString header;</div><div><b><span style="white-space:pre-wrap">          </span>// Enabling the thread safe logging actually deadlocks right now.</b></div><div><b><span style="white-space:pre-wrap">             </span>// Need to fix this at some point.</b></div><div>//        static Mutex g_LogThreadedMutex(Mutex::eMutexTypeRecursive);</div><div>//        Mutex::Locker locker (g_LogThreadedMutex);</div><div><br></div><br><div class="gmail_quote">On Thu, May 7, 2015 at 9:09 AM Ed Maste <<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7 May 2015 at 01:03, Vince Harron <<a href="mailto:vince@nethacker.com" target="_blank">vince@nethacker.com</a>> wrote:<br>
> Okay, I don't know what I was thinking.<br>
><br>
> Debugger.cpp:1317<br>
> It's re-using an existing stream if the filename is identical.<br>
><br>
> The stomping that Ed is seeing might be solvable by using the -t flag as Jim<br>
> suggests.<br>
<br>
Possibly - I only looked into this when I was first getting started<br>
with LLDB and enabled a large set of log channels to try to understand<br>
how everything worked. I distinctly recall that log entries were<br>
completely missing though, not just "interweaved" as the help for -t<br>
suggests.<br>
<br>
Ah, this seems a bit bizarre:<br>
<br>
    if (log_options == 0)<br>
        log_options = LLDB_LOG_OPTION_PREPEND_THREAD_NAME |<br>
LLDB_LOG_OPTION_THREADSAFE;<br>
<br>
so by default we get the thread name and threadsafe logging, but if<br>
any options are set then they are not automatically set.<br>
<br>
Oh, but I don't see anywhere LLDB_LOG_OPTION_THREADSAFE is checked.<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</blockquote></div></div>