<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Utility/Stream.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] Fix indentation when printing stop hooks (#165945)</title>
<updated>2025-11-03T21:29:34+00:00</updated>
<author>
<name>Julian Lettner</name>
<email>yln@users.noreply.github.com</email>
</author>
<published>2025-11-03T21:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=25da15f9b1f910cb5d350381c1c8a287cbe4cf0f'/>
<id>25da15f9b1f910cb5d350381c1c8a287cbe4cf0f</id>
<content type='text'>
This commit aggregates the following changes:
1. Fix the format (i.e., indentation) when printing stop hooks via `target
   stop-hook list`.
2. Add `IndentScope Stream::MakeIndentScope()` to make managing (and restoring!)
   of the indentation level on `Stream` instances more ergonomic and less error
   prone.
3. Simplify printing of stop hooks using the new `IndentScope`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit aggregates the following changes:
1. Fix the format (i.e., indentation) when printing stop hooks via `target
   stop-hook list`.
2. Add `IndentScope Stream::MakeIndentScope()` to make managing (and restoring!)
   of the indentation level on `Stream` instances more ergonomic and less error
   prone.
3. Simplify printing of stop hooks using the new `IndentScope`.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] refactor highlighting function for image lookup command (#76112)</title>
<updated>2024-01-22T09:08:42+00:00</updated>
<author>
<name>José Lira Junior</name>
<email>jljuniorpb@gmail.com</email>
</author>
<published>2024-01-22T09:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7b925c3edb6297df6bcf87dfcfdfd645f03b5388'/>
<id>7b925c3edb6297df6bcf87dfcfdfd645f03b5388</id>
<content type='text'>
Follow-up to #69422.

This PR puts all the highlighting settings into a single struct for
easier handling

Co-authored-by: Talha Tahir &lt;talha.tahir@10xengineers.ai&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to #69422.

This PR puts all the highlighting settings into a single struct for
easier handling

Co-authored-by: Talha Tahir &lt;talha.tahir@10xengineers.ai&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] colorize symbols in image lookup with a regex pattern (#69422)</title>
<updated>2023-12-08T11:09:04+00:00</updated>
<author>
<name>taalhaataahir0102</name>
<email>77788288+taalhaataahir0102@users.noreply.github.com</email>
</author>
<published>2023-12-08T11:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c90cb6eee8296953c097fcc9fc6e61f739c0dad3'/>
<id>c90cb6eee8296953c097fcc9fc6e61f739c0dad3</id>
<content type='text'>
Fixes https://github.com/llvm/llvm-project/issues/57372

Previously some work has already been done on this. A PR was generated
but it remained in review:
https://reviews.llvm.org/D136462

In short previous approach was following:
Changing the symbol names (making the searched part colorized) -&gt;
printing them -&gt; restoring the symbol names back in their original form.

The reviewers suggested that instead of changing the symbol table, this
colorization should be done in the dump functions itself. Our strategy
involves passing the searched regex pattern to the existing dump
functions responsible for printing information about the searched
symbol. This pattern is propagated until it reaches the line in the dump
functions responsible for displaying symbol information on screen.

At this point, we've introduced a new function called
"PutCStringColorHighlighted," which takes the searched pattern, a prefix and suffix,
and the text and applies colorization to highlight the pattern in the
output. This approach aims to streamline the symbol search process to
improve readability of search results.

Co-authored-by: José L. Junior &lt;josejunior@10xengineers.ai&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/llvm/llvm-project/issues/57372

Previously some work has already been done on this. A PR was generated
but it remained in review:
https://reviews.llvm.org/D136462

In short previous approach was following:
Changing the symbol names (making the searched part colorized) -&gt;
printing them -&gt; restoring the symbol names back in their original form.

The reviewers suggested that instead of changing the symbol table, this
colorization should be done in the dump functions itself. Our strategy
involves passing the searched regex pattern to the existing dump
functions responsible for printing information about the searched
symbol. This pattern is propagated until it reaches the line in the dump
functions responsible for displaying symbol information on screen.

At this point, we've introduced a new function called
"PutCStringColorHighlighted," which takes the searched pattern, a prefix and suffix,
and the text and applies colorization to highlight the pattern in the
output. This approach aims to streamline the symbol search process to
improve readability of search results.

Co-authored-by: José L. Junior &lt;josejunior@10xengineers.ai&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB</title>
<updated>2022-03-14T20:32:03+00:00</updated>
<author>
<name>Shafik Yaghmour</name>
<email>syaghmour@apple.com</email>
</author>
<published>2022-03-14T20:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28c878aeb29a7e7a9ae8f748de6a3c41482b97be'/>
<id>28c878aeb29a7e7a9ae8f748de6a3c41482b97be</id>
<content type='text'>
Applied modernize-use-default-member-init clang-tidy check over LLDB.
It appears in many files we had already switched to in class member init but
never updated the constructors to reflect that. This check is already present in
the lldb/.clang-tidy config.

Differential Revision: https://reviews.llvm.org/D121481
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Applied modernize-use-default-member-init clang-tidy check over LLDB.
It appears in many files we had already switched to in class member init but
never updated the constructors to reflect that. This check is already present in
the lldb/.clang-tidy config.

Differential Revision: https://reviews.llvm.org/D121481
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Don't rely on wrapping in PutRawBytes/PutBytesAsRawHex8</title>
<updated>2022-02-16T04:38:25+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2022-02-16T04:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=920146316da1e55017d46cfd62be783419da03d5'/>
<id>920146316da1e55017d46cfd62be783419da03d5</id>
<content type='text'>
I was looking at Stream::PutRawBytes and thought I spotted a bug because
both loops are using `i &lt; src_len` as the loop condition despite them
iterating in opposite directions.

On closer inspection, the existing code is correct, because it relies on
well-defined unsigned integer wrapping. Correct doesn't mean readable,
so this patch changes the loop condition to compare against 0 when
decrementing i while still covering the edge case of src_len potentially
being 0 itself.

Differential revision: https://reviews.llvm.org/D119857
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was looking at Stream::PutRawBytes and thought I spotted a bug because
both loops are using `i &lt; src_len` as the loop condition despite them
iterating in opposite directions.

On closer inspection, the existing code is correct, because it relies on
well-defined unsigned integer wrapping. Correct doesn't mean readable,
so this patch changes the loop condition to compare against 0 when
decrementing i while still covering the edge case of src_len potentially
being 0 itself.

Differential revision: https://reviews.llvm.org/D119857
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Replace default bodies of special member functions with = default;</title>
<updated>2021-07-02T18:31:16+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2021-07-02T18:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd2433e139f78658e059cf911af8ae735fcda57c'/>
<id>fd2433e139f78658e059cf911af8ae735fcda57c</id>
<content type='text'>
Replace default bodies of special member functions with = default;

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix ,

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html

Differential revision: https://reviews.llvm.org/D104041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace default bodies of special member functions with = default;

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix ,

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html

Differential revision: https://reviews.llvm.org/D104041
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use C++11 default member initializers</title>
<updated>2021-06-09T16:43:13+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2021-06-09T16:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9494c510af56d9c8593ab69017dcaa232210b235'/>
<id>9494c510af56d9c8593ab69017dcaa232210b235</id>
<content type='text'>
This converts a default constructor's member initializers into C++11
default member initializers. This patch was automatically generated with
clang-tidy and the modernize-use-default-member-init check.

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix

This is a mass-refactoring patch and this commit will be added to
.git-blame-ignore-revs.

Differential revision: https://reviews.llvm.org/D103483
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts a default constructor's member initializers into C++11
default member initializers. This patch was automatically generated with
clang-tidy and the modernize-use-default-member-init check.

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix

This is a mass-refactoring patch and this commit will be added to
.git-blame-ignore-revs.

Differential revision: https://reviews.llvm.org/D103483
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFC] Use C++ versions of the deprecated C standard library headers</title>
<updated>2021-05-26T10:46:12+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2021-05-26T10:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=76e47d4887f456878c0e2f20ebfae36267006cd7'/>
<id>76e47d4887f456878c0e2f20ebfae36267006cd7</id>
<content type='text'>
The C headers are deprecated so as requested in D102845, this is replacing them
all with their (not deprecated) C++ equivalent.

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D103084
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The C headers are deprecated so as requested in D102845, this is replacing them
all with their (not deprecated) C++ equivalent.

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D103084
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb/Interpreter] Support color in CommandReturnObject</title>
<updated>2020-06-09T17:45:45+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2020-06-09T17:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de019b88dd5804ec996fe8c12cddcc6feb13afa1'/>
<id>de019b88dd5804ec996fe8c12cddcc6feb13afa1</id>
<content type='text'>
Color the error: and warning: part of the CommandReturnObject output,
similar to how an error is printed from the driver when colors are
enabled.

Differential revision: https://reviews.llvm.org/D81058
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Color the error: and warning: part of the CommandReturnObject output,
similar to how an error is printed from the driver when colors are
enabled.

Differential revision: https://reviews.llvm.org/D81058
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb/Utility] Fix unspecified behavior.</title>
<updated>2020-02-25T05:25:55+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2020-02-25T05:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35a061453579f623aca1edc7f6f23dd969c21395'/>
<id>35a061453579f623aca1edc7f6f23dd969c21395</id>
<content type='text'>
Order of evaluation of the operands of any C++ operator [...] is
unspecified. This patch fixes the issue in Stream::Indent by calling the
function consecutively.

On my Windows setup, TestSettings.py fails because the function prints
the value first, followed by the indentation.

Expected result:
  MY_FILE=this is a file name with spaces.txt

Actual result:
MY_FILE  =this is a file name with spaces.txt
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Order of evaluation of the operands of any C++ operator [...] is
unspecified. This patch fixes the issue in Stream::Indent by calling the
function consecutively.

On my Windows setup, TestSettings.py fails because the function prints
the value first, followed by the indentation.

Expected result:
  MY_FILE=this is a file name with spaces.txt

Actual result:
MY_FILE  =this is a file name with spaces.txt
</pre>
</div>
</content>
</entry>
</feed>
