[lldb-dev] Logging different channels to different files

Ed Maste emaste at freebsd.org
Thu May 7 09:04:11 PDT 2015


On 7 May 2015 at 01:03, Vince Harron <vince at nethacker.com> wrote:
> Okay, I don't know what I was thinking.
>
> Debugger.cpp:1317
> It's re-using an existing stream if the filename is identical.
>
> The stomping that Ed is seeing might be solvable by using the -t flag as Jim
> suggests.

Possibly - I only looked into this when I was first getting started
with LLDB and enabled a large set of log channels to try to understand
how everything worked. I distinctly recall that log entries were
completely missing though, not just "interweaved" as the help for -t
suggests.

Ah, this seems a bit bizarre:

    if (log_options == 0)
        log_options = LLDB_LOG_OPTION_PREPEND_THREAD_NAME |
LLDB_LOG_OPTION_THREADSAFE;

so by default we get the thread name and threadsafe logging, but if
any options are set then they are not automatically set.

Oh, but I don't see anywhere LLDB_LOG_OPTION_THREADSAFE is checked.



More information about the lldb-dev mailing list