Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
92014631 |
| 16-Feb-2022 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Don't rely on wrapping in PutRawBytes/PutBytesAsRawHex8
I was looking at Stream::PutRawBytes and thought I spotted a bug because both loops are using `i < src_len` as the loop condition despi
[lldb] Don't rely on wrapping in PutRawBytes/PutBytesAsRawHex8
I was looking at Stream::PutRawBytes and thought I spotted a bug because both loops are using `i < 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
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2 |
|
#
651936e5 |
| 11-Feb-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Remove Stream::Indent(const char *) overload in favor of the StringRef version
|
#
5b61f78a |
| 11-Feb-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Add test for lldb_private::Stream's indentation functionality
|
Revision tags: llvmorg-10.0.0-rc1 |
|
#
80814287 |
| 24-Jan-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headers
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
show more ...
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2 |
|
#
1462f5a4 |
| 05-Dec-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Move Address and AddressRange functions out of Stream and let them take raw_ostream
Summary: Yet another step on the long road towards getting rid of lldb's Stream class.
We probably sh
[lldb][NFC] Move Address and AddressRange functions out of Stream and let them take raw_ostream
Summary: Yet another step on the long road towards getting rid of lldb's Stream class.
We probably should just make this some kind of member of Address/AddressRange, but it seems quite often we just push in random integers in there and this is just about getting rid of Stream and not improving arbitrary APIs.
I had to rename another `DumpAddress` function in FormatEntity that is dumping the content of an address to make Clang happy.
Reviewers: labath
Reviewed By: labath
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71052
show more ...
|
#
150c8dd1 |
| 26-Nov-2019 |
Pavel Labath <pavel@labath.sk> |
[lldb] Remove some (almost) unused Stream::operator<<'s
llvm::raw_ostream provides equivalent functionality.
|
#
16d20130 |
| 04-Dec-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Add test for Stream::Address and Stream::AddressRange
I'm refactoring those functions, so we should have some tests for them before doing that.
|
Revision tags: llvmorg-9.0.1-rc1 |
|
#
957d9a03 |
| 14-Nov-2019 |
Pavel Labath <pavel@labath.sk> |
[lldb] remove unsigned Stream::operator<< overloads
Summary: I recently re-discovered that the unsinged stream operators of the lldb_private::Stream class have a surprising behavior in that they pri
[lldb] remove unsigned Stream::operator<< overloads
Summary: I recently re-discovered that the unsinged stream operators of the lldb_private::Stream class have a surprising behavior in that they print the number in hex. This is all the more confusing because the "signed" versions of those operators behave normally.
Now that, thanks to Raphael, each Stream class has a llvm::raw_ostream wrapper, I think we should delete most of our formatting capabilities and just delegate to that. This patch tests the water by just deleting the operators with the most surprising behavior.
Most of the code using these operators was printing user_id_t values. It wasn't fully consistent about prefixing them with "0x", but I've tried to consistenly print it without that prefix, to make it more obviously different from pointer values.
Reviewers: teemperor, JDevlieghere, jdoerfert
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70241
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
8b3af63b |
| 10-Apr-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment.
Its use is not really consistent across the code base
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment.
Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment.
I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn.
Differential revision: https://reviews.llvm.org/D60508
llvm-svn: 358135
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3 |
|
#
7f815a9a |
| 12-Feb-2019 |
Pavel Labath <pavel@labath.sk> |
Have Stream::PutCStringAsRawHex8 take llvm::StringRef
This enables the function to be called with a StringRef without jumping through any hoops. I rename the function to "PutStringAsRawHex8" to hono
Have Stream::PutCStringAsRawHex8 take llvm::StringRef
This enables the function to be called with a StringRef without jumping through any hoops. I rename the function to "PutStringAsRawHex8" to honor the extended interface. I also remove ".c_str()" from any calls to this function I could find.
llvm-svn: 353841
show more ...
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo 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
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
92b16738 |
| 02-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Add byte counting mechanism to LLDB's Stream class.
Summary: This patch allows LLDB's Stream class to count the bytes it has written to so far.
There are two major motivations for this patch:
The
Add byte counting mechanism to LLDB's Stream class.
Summary: This patch allows LLDB's Stream class to count the bytes it has written to so far.
There are two major motivations for this patch:
The first one is that this will allow us to get rid of all the handwritten byte counting code we have in LLDB so far. Examples for this are pretty much all functions in LLDB that take a Stream to write to and return a size_t, which usually represents the bytes written.
By moving to this centralized byte counting mechanism, we hopefully can avoid some tricky errors that happen when some code forgets to count the written bytes while writing something to a stream.
The second motivation is that this is needed for the migration away from LLDB's `Stream` and towards LLVM's `raw_ostream`. My current plan is to start offering a fake raw_ostream class that just forwards to a LLDB Stream.
However, for this raw_ostream wrapper we need to fulfill the raw_ostream interface with LLDB's Stream, which currently lacks the ability to count the bytes written so far (which raw_ostream exposes by it's `tell()` method). By adding this functionality it is trivial to start rolling out our raw_ostream wrapper (and then eventually completely move to raw_ostream).
Also, once this fake raw_ostream is available, we can start replacing our own code writing to LLDB's Stream by LLVM code writing to raw_ostream. The best example for this is the LEB128 encoding we currently ship, which can be replaced with by LLVM's version which accepts an raw_ostream.
From the point of view of the pure source changes this test does, we essentially just renamed the Write implementation in Stream to `WriteImpl` while the `Write` method everyone is using to write its raw bytes is now just forwarding and counting the written bytes.
Reviewers: labath, davide
Reviewed By: labath
Subscribers: JDevlieghere, lldb-commits
Differential Revision: https://reviews.llvm.org/D50159
llvm-svn: 338733
show more ...
|
#
f4590de9 |
| 01-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Fix out-of-bounds read in Stream::PutCStringAsRawHex8
Summary: When I added the Stream unit test (r338488), the build bots failed due to an out-of- bound reads when passing an empty string to the Pu
Fix out-of-bounds read in Stream::PutCStringAsRawHex8
Summary: When I added the Stream unit test (r338488), the build bots failed due to an out-of- bound reads when passing an empty string to the PutCStringAsRawHex8 method. In r338491 I removed the test case to fix the bots.
This patch fixes this in PutCStringAsRawHex8 by always checking for the terminating null character in the given string (instead of skipping it the first time). It also re-adds the test case I removed.
Reviewers: vsk
Reviewed By: vsk
Subscribers: vsk, lldb-commits
Differential Revision: https://reviews.llvm.org/D50149
llvm-svn: 338637
show more ...
|
#
0bb8d83c |
| 01-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Don't ignore byte_order in Stream::PutMaxHex64
Reviewers: labath
Reviewed By: labath
Subscribers: zturner, lldb-commits
Differential Revision: https://reviews.llvm.org/D50025
llvm-svn: 338591
|
#
7dd0aba0 |
| 01-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Removed failing StreamTest case
The suspicious behavior is obviously because this method reads OOB memory, so I'll remove it for now and re-add the test alongside the fix later.
llvm-svn: 338491
|
#
b1dfad06 |
| 01-Aug-2018 |
Raphael Isemann <teemperor@gmail.com> |
Added initial unit test for LLDB's Stream class.
Summary: This adds an initial small unit test for LLDB's Stream class, which should at least cover most of the functions in the Stream class. StreamS
Added initial unit test for LLDB's Stream class.
Summary: This adds an initial small unit test for LLDB's Stream class, which should at least cover most of the functions in the Stream class. StreamString is always in big endian mode, so that's the only stream byte order path this test covers as of now. Also, the binary mode still needs to be tested for all print methods.
Also adds some FIXMEs for wrong/strange result values of the Stream class that we hit while testing those functions.
Reviewers: labath
Reviewed By: labath
Subscribers: probinson, labath, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D50027
llvm-svn: 338488
show more ...
|