clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land.
Looks good as long as if we type two log enable commands like: (lldb) log enable -f /tmp/a.txt lldb process (lldb) log enable -f /tmp/a.txt lldb api share the same log stream (we don't open /tmp/a.txt twice) if is still open and available. ================ Comment at: source/Core/StreamCallback.cpp:22 StreamCallback::StreamCallback(lldb::LogOutputCallback callback, void *baton) - : Stream(0, 4, eByteOrderBig), m_callback(callback), m_baton(baton), - m_accumulated_data(), m_collection_mutex() {} ---------------- labath wrote: > zturner wrote: > > I find it rather odd that this was hardcoding big endian. Was the > > endianness here important for some reason? > I think that was there just because you needed to specify some value. As we > were always printing strings, it did not matter anyway. Pavel is correct, this is because streams can be put into binary mode and that you can use Stream::Put32(uint32_t) which will write a number if in non-binary mode, or endian correct bytes if in binary mode. Logs didn't ever use the binary feature so we just set it to defaults. https://reviews.llvm.org/D29615 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits