<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Make logging machinery type-safe</title>
<updated>2022-01-25T11:13:49+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2022-01-17T14:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f08db66db93b42ff26caca2159bd548436184ae'/>
<id>0f08db66db93b42ff26caca2159bd548436184ae</id>
<content type='text'>
This patch makes use of c++ type checking and scoped enums to make
logging statements shorter and harder to misuse.

Defines like LIBLLDB_LOG_PROCESS are replaces with LLDBLog::Process.
Because it now carries type information we do not need to worry about
matching a specific enum value with the right getter function -- the
compiler will now do that for us.

The main entry point for the logging machinery becomes the GetLog
(template) function, which will obtain the correct Log object based on
the enum type. It achieves this through another template function
(LogChannelFor&lt;T&gt;), which must be specialized for each type, and should
return the appropriate channel object.

This patch also removes the ability to log a message if multiple
categories are enabled simultaneously as it was unused and confusing.

This patch does not actually remove any of the existing interfaces. The
defines and log retrieval functions are left around as wrappers around
the new interfaces. They will be removed in follow-up patch.

Differential Revision: https://reviews.llvm.org/D117490
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes use of c++ type checking and scoped enums to make
logging statements shorter and harder to misuse.

Defines like LIBLLDB_LOG_PROCESS are replaces with LLDBLog::Process.
Because it now carries type information we do not need to worry about
matching a specific enum value with the right getter function -- the
compiler will now do that for us.

The main entry point for the logging machinery becomes the GetLog
(template) function, which will obtain the correct Log object based on
the enum type. It achieves this through another template function
(LogChannelFor&lt;T&gt;), which must be specialized for each type, and should
return the appropriate channel object.

This patch also removes the ability to log a message if multiple
categories are enabled simultaneously as it was unused and confusing.

This patch does not actually remove any of the existing interfaces. The
defines and log retrieval functions are left around as wrappers around
the new interfaces. They will be removed in follow-up patch.

Differential Revision: https://reviews.llvm.org/D117490
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFC] Fix all formatting errors in .cpp file headers</title>
<updated>2020-01-24T07:52:55+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2020-01-24T07:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=808142876c10b52e7ee57cdc6dcf0acc5c97c1b7'/>
<id>808142876c10b52e7ee57cdc6dcf0acc5c97c1b7</id>
<content type='text'>
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).

This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).

Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73258
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).

This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).

Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73258
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the file headers across all of the LLVM projects in the monorepo</title>
<updated>2019-01-19T08:50:56+00:00</updated>
<author>
<name>Chandler Carruth</name>
<email>chandlerc@gmail.com</email>
</author>
<published>2019-01-19T08:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2946cd701067404b99c39fb29dc9c74bd7193eb3'/>
<id>2946cd701067404b99c39fb29dc9c74bd7193eb3</id>
<content type='text'>
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove lldb streams from the Log class completely</title>
<updated>2017-03-15T09:06:58+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2017-03-15T09:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=775588c0c308705bafe0e2d8e974b244c779d73c'/>
<id>775588c0c308705bafe0e2d8e974b244c779d73c</id>
<content type='text'>
Summary:
previously we switched to llvm streams for log output, this completes
the switch for the error streams.

I also clean up the includes and remove the unused argument from
DisableAllLogChannels().

This required adding a bit of boiler plate to convert the output in the
command interpreter, but that should go away when we switch command
results to use llvm streams as well.

Reviewers: zturner, eugene

Subscribers: lldb-commits, emaste

Differential Revision: https://reviews.llvm.org/D30894

llvm-svn: 297812
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
previously we switched to llvm streams for log output, this completes
the switch for the error streams.

I also clean up the includes and remove the unused argument from
DisableAllLogChannels().

This required adding a bit of boiler plate to convert the output in the
command interpreter, but that should go away when we switch command
results to use llvm streams as well.

Reviewers: zturner, eugene

Subscribers: lldb-commits, emaste

Differential Revision: https://reviews.llvm.org/D30894

llvm-svn: 297812
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch "posix" to the new log channel registration mechanism</title>
<updated>2017-02-23T10:33:16+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2017-02-23T10:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c29f7ff33464f14663c21b4d35a038a79189c709'/>
<id>c29f7ff33464f14663c21b4d35a038a79189c709</id>
<content type='text'>
Summary:
This also removes magic rename code, which caused the channel to be
called "linux" when built on a linux machine, and "freebsd" when built
on a freebsd one, which seems unnecessary - registering a new channel is
sufficiently simple now that if we wish to log something extremely
os-specific, we can just create a new channel. None of the current
categories seem very specific to one OS or another.

Reviewers: emaste, krytarowski

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D30250

llvm-svn: 295954
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This also removes magic rename code, which caused the channel to be
called "linux" when built on a linux machine, and "freebsd" when built
on a freebsd one, which seems unnecessary - registering a new channel is
sufficiently simple now that if we wish to log something extremely
os-specific, we can just create a new channel. None of the current
categories seem very specific to one OS or another.

Reviewers: emaste, krytarowski

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D30250

llvm-svn: 295954
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some dead code from ProcessPOSIXLog</title>
<updated>2017-02-13T11:03:24+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2017-02-13T11:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=18eeccabf2477b7dbac47d516b143c1951552033'/>
<id>18eeccabf2477b7dbac47d516b143c1951552033</id>
<content type='text'>
llvm-svn: 294940
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 294940
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert Log class to llvm streams</title>
<updated>2017-02-10T11:49:21+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2017-02-10T11:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5fae71c51cc8c3d51e86cd597ce91a254e9175f4'/>
<id>5fae71c51cc8c3d51e86cd597ce91a254e9175f4</id>
<content type='text'>
Summary:
This converts LLDB's logging to use llvm streams instead of
lldb_private::Stream and friends. The changes are mostly
straight-forward and amount to s/lldb_private::Stream/llvm::raw_ostream.

The part worth calling out is the rewrite of the StreamCallback class.
Previously this class contained a per-thread buffer of data written. I
assume this had something to do with it trying to make sure each log
line is delivered as a single event, instead of multiple (possibly
interleaved) events. However, this is no longer relevant as the Log
class already writes things to a temporary buffer and then delivers the
message as a single "write", so I have just removed the code in
question.

Reviewers: zturner, clayborg

Subscribers: emaste, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29615

llvm-svn: 294736
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This converts LLDB's logging to use llvm streams instead of
lldb_private::Stream and friends. The changes are mostly
straight-forward and amount to s/lldb_private::Stream/llvm::raw_ostream.

The part worth calling out is the rewrite of the StreamCallback class.
Previously this class contained a per-thread buffer of data written. I
assume this had something to do with it trying to make sure each log
line is delivered as a single event, instead of multiple (possibly
interleaved) events. However, this is no longer relevant as the Log
class already writes things to a temporary buffer and then delivers the
message as a single "write", so I have just removed the code in
question.

Reviewers: zturner, clayborg

Subscribers: emaste, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29615

llvm-svn: 294736
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the verbose category in the posix channel</title>
<updated>2017-02-06T19:31:05+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2017-02-06T19:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aafe053c5311df904a337f8782b6122f052e84d2'/>
<id>aafe053c5311df904a337f8782b6122f052e84d2</id>
<content type='text'>
replace by LLDB_LOGV

llvm-svn: 294223
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
replace by LLDB_LOGV

llvm-svn: 294223
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch std::call_once to llvm::call_once</title>
<updated>2017-02-06T17:55:02+00:00</updated>
<author>
<name>Kamil Rytarowski</name>
<email>n54@gmx.com</email>
</author>
<published>2017-02-06T17:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c5f28e2a05f2ebff09e1cd02a5faa84369c5c655'/>
<id>c5f28e2a05f2ebff09e1cd02a5faa84369c5c655</id>
<content type='text'>
Summary:
The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms.

This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger.

Sponsored by &lt;The NetBSD Foundation&gt;

Reviewers: labath, joerg, emaste, mehdi_amini, clayborg

Reviewed By: labath, clayborg

Subscribers: #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D29288

llvm-svn: 294202
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms.

This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger.

Sponsored by &lt;The NetBSD Foundation&gt;

Reviewers: labath, joerg, emaste, mehdi_amini, clayborg

Reviewed By: labath, clayborg

Subscribers: #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D29288

llvm-svn: 294202
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a crash in ProcessPOSIXLog</title>
<updated>2016-11-28T11:47:14+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>labath@google.com</email>
</author>
<published>2016-11-28T11:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4fd575423483378560db55ee291576d77b57c7a0'/>
<id>4fd575423483378560db55ee291576d77b57c7a0</id>
<content type='text'>
We are getting a null pointer for the list of categories here (presumably due to
the args refactor).

llvm-svn: 288026
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are getting a null pointer for the list of categories here (presumably due to
the args refactor).

llvm-svn: 288026
</pre>
</div>
</content>
</entry>
</feed>
