[lldb-dev] logging in lldb

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Tue Dec 6 09:32:01 PST 2016


Ah, I totally forgot about the llvm DEBUG macro. I would be open to
trying merge these two approaches together. However, I think our's is
a much more heavy-weight system, so it might be too heavy for llvm,
and I am not sure how much would we be willing to lose in the process:
- we have two level logging architecture ("process" category in "lldb" channel)
- logging can be enabled/disabled at runtime
- logs can be redirected to various destinations

Maybe it will be possible to design it in a way that the complexity is
apparent to those who wish to use it. I'll need to think about that...

pl


On 6 December 2016 at 17:06, Chris Bieneman <beanz at apple.com> wrote:
> My only concern reading this is that LLVM already has a similar mechanism for channel-based logging that is used throughout the backends. Is there a reason to invent our own? Maybe we can take what is in LLVM, enhance it and use shared functionality?
>
> There are a few differences between your solution and the LLVM one, but I'm not sure they are sufficient to justify creating a new solution.
>
> The LLVM debug logging solution is documented in the LLVM Programmers Manual here:
> http://llvm.org/docs/ProgrammersManual.html#the-debug-macro-and-debug-option
>
> -Chris
>
>> On Dec 6, 2016, at 8:57 AM, Pavel Labath <labath at google.com> wrote:
>>
>> On 6 December 2016 at 16:51, Jim Ingham <jingham at apple.com> wrote:
>>> Sorry, I'm being dense.  What is Dxxxxx?
>>>
>>> Jim
>>>
>>>> On Dec 6, 2016, at 8:23 AM, Pavel Labath <labath at google.com> wrote:
>>>>
>>>> I have created straw-man implementation of such an interface in
>>>> Dxxxxx, together with some examples of how it's used, and I'd like to
>>>
>>
>> https://reviews.llvm.org/D27459 :D
>>
>> Sorry, I forgot to replace this by actual revision when I submitted the code.
>>
>> pl
>


More information about the lldb-dev mailing list