|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, 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, 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 |
|
| #
926a7ecd |
| 14-Jun-2022 |
Pavel Labath <[email protected]> |
[lldb] Fix TCPSocket::Connect when getaddrinfo returns multiple addrs
TCPSocket::Connect() calls SocketAddress::GetAddressInfo() and tries to connect any of them (in a for loop).
This used to work
[lldb] Fix TCPSocket::Connect when getaddrinfo returns multiple addrs
TCPSocket::Connect() calls SocketAddress::GetAddressInfo() and tries to connect any of them (in a for loop).
This used to work before commit 4f6d3a376c9f("[LLDB] Fix setting of success in Socket::Close()") https://reviews.llvm.org/D116768.
As a side effect of that commit, TCPSocket can only connect to the first address returned by SocketAddress::GetAddressInfo().
1. If the attempt to connect to the first address fails, TCPSocket::Connect(), calls CLOSE_SOCKET(GetNativeSocket()), which closes the fd, but DOES NOT set m_socket to kInvalidSocketValue. 2. On the second attempt, TCPSocket::CreateSocket() calls Socket::Close(). 3. Socket::Close() proceeds, because IsValid() is true (m_socket was not reset on step 1). 4. Socket::Close() calls ::close(m_socket), which fails 5. Since commit 4f6d3a376c9f("[LLDB] Fix setting of success in Socket::Close()"), this is error is detected. Socket::Close() returns an error. 6. TCPSocket::CreateSocket() therefore returns an error. 7. TCPSocket::Connect() detects the error and continues, skipping the second (and the third, fourth...) address.
This commit fixes the problem by changing step 1: by calling Socket::Close, instead of directly calling close(m_socket), m_socket is also se to kInvalidSocketValue. On step 3, Socket::Close() is going to return immediately and, on step 6, TCPSocket::CreateSocket() does not fail.
How to reproduce this problem:
On my system, getaddrinfo() resolves "localhost" to "::1" (first) and to "127.0.0.1" (second).
Start a gdbserver that only listens on 127.0.0.1:
``` gdbserver 127.0.0.1:2159 /bin/cat Process /bin/cat created; pid = 2146709 Listening on port 2159 ```
Start lldb and make it connect to "localhost:2159"
``` ./bin/lldb (lldb) gdb-remote localhost:2159 ```
Before 4f6d3a376c9f("[LLDB] Fix setting of success in Socket::Close()"), this used to work. After that commit, it stopped working. This commit fixes the problem.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D126702
show more ...
|
|
Revision tags: 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, llvmorg-14.0.0-rc1 |
|
| #
c34698a8 |
| 03-Feb-2022 |
Pavel Labath <[email protected]> |
[lldb] Rename Logging.h to LLDBLog.h and clean up includes
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging inf
[lldb] Rename Logging.h to LLDBLog.h and clean up includes
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging infrastructure). This worked because Log.h included Logging.h, even though it should.
After the recent refactor, it became impossible the two files include each other in this direction (the opposite inclusion is needed), so this patch removes the workaround that was put in place and cleans up all files to include the right thing. It also renames the file to LLDBLog to better reflect its purpose.
show more ...
|
|
Revision tags: llvmorg-15-init |
|
| #
a007a6d8 |
| 31-Jan-2022 |
Pavel Labath <[email protected]> |
[lldb] Convert "LLDB" log channel to the new API
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
073c5d0e |
| 27-Oct-2021 |
Michał Górny <[email protected]> |
[lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated struct
Differential Revision: https://reviews.llvm.org/D112629
|
| #
93c1b3ca |
| 05-Oct-2021 |
Pavel Labath <[email protected]> |
[lldb] Remove some anonymous namespaces
.. and reduce the scope of others. They don't follow llvm coding standards (which say they should be used only when the same effect cannot be achieved with th
[lldb] Remove some anonymous namespaces
.. and reduce the scope of others. They don't follow llvm coding standards (which say they should be used only when the same effect cannot be achieved with the static keyword), and they set a bad example.
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
| #
5f1c8d8a |
| 24-Sep-2021 |
Michał Górny <[email protected]> |
[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API
Refactor Socket::DecodeHostAndPort() to use LLVM API over redundant LLDB API. In particular, this means llvm::Regex, llvm::Error r
[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API
Refactor Socket::DecodeHostAndPort() to use LLVM API over redundant LLDB API. In particular, this means llvm::Regex, llvm::Error return type and llvm::to_integer().
While at it, change the port type from int32_t to uint16_t. The method never returns any value outside this range, and using the correct type allows us to rely on getAsInteger()'s implicit overflow check.
Differential Revision: https://reviews.llvm.org/D110391
show more ...
|
| #
c1af84ce |
| 24-Sep-2021 |
Michał Górny <[email protected]> |
Revert "[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API"
This reverts commit a6daf99228bc16fb7f2596d67a0d00fef327ace5. It causes buildbot regressions, I'll investigate.
|
| #
a6daf992 |
| 24-Sep-2021 |
Michał Górny <[email protected]> |
[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API
Refactor Socket::DecodeHostAndPort() to use LLVM API over redundant LLDB API. In particular, this means llvm::Regex, llvm::Error r
[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API
Refactor Socket::DecodeHostAndPort() to use LLVM API over redundant LLDB API. In particular, this means llvm::Regex, llvm::Error return type and llvm::to_integer().
While at it, change the port type from int32_t to uint16_t. The method never returns any value outside this range, and using the correct type allows us to rely on getAsInteger()'s implicit overflow check.
Differential Revision: https://reviews.llvm.org/D110391
show more ...
|
|
Revision tags: 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 |
|
| #
ac2b7f8a |
| 13-Aug-2020 |
Raphael Isemann <[email protected]> |
[lldb][NFC] Fix indentation in TCPSocket::CloseListenSockets
|
|
Revision tags: 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 |
|
| #
4d40d664 |
| 27-Apr-2020 |
Eric Christopher <[email protected]> |
Fix up a clang-tidy nit about using empty rather than size == 0.
|
| #
58435f69 |
| 27-Apr-2020 |
Pavel Labath <[email protected]> |
[lldb] Fix windows build break from 18e96a31
|
| #
18e96a31 |
| 27-Apr-2020 |
Pavel Labath <[email protected]> |
[lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured
Sadly IPv6 is still not present anywhere. The test was attempting to detect&skip such hosts, but the way it did that (esse
[lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured
Sadly IPv6 is still not present anywhere. The test was attempting to detect&skip such hosts, but the way it did that (essentially, by calling getaddrinfo) meant that it only detected hosts which have IPv6 support completely compiled out. It did not do anything about hosts which have it compiled in, but lack runtime configuration even for the ::1 loopback address.
This patch changes the detection logic to use a new method. It does it by attempting to bind a socket to the appropriate loopback address. That should ensure the hosts loopback interface is fully set up. In an effort to avoid silently skipping the test on too many hosts, the test is fairly strict about the kind of error it expects in these cases -- it will only skip the test when receiving EADDRNOTAVAIL. If we find other error codes that can be reasonably returned in these situations, we can add more of them.
The (small) change in TCPSocket.cpp is to ensure that the code correctly propagates the error received from the OS.
show more ...
|
|
Revision tags: 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, llvmorg-10.0.0-rc1 |
|
| #
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <[email protected]> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
| #
80814287 |
| 24-Jan-2020 |
Raphael Isemann <[email protected]> |
[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 |
|
| #
3011d55f |
| 12-Dec-2019 |
Jonas Devlieghere <[email protected]> |
[lldb/Host] Use cmakedefine01 for LLDB_ENABLE_POSIX
Rename LLDB_DISABLE_POSIX to LLDB_ENABLE_POSIX and use cmakedefine01 for consistency.
|
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
| #
6aa60b05 |
| 12-Nov-2019 |
Pavel Labath <[email protected]> |
[lldb] Fix more -Wdeprecated-copy warnings
This warning triggers when a class defines a copy constructor but not a copy-assignment operator (which then gets auto-generated by the compiler). Fix the
[lldb] Fix more -Wdeprecated-copy warnings
This warning triggers when a class defines a copy constructor but not a copy-assignment operator (which then gets auto-generated by the compiler). Fix the warning by deleting the other operator too, as the default implementation works just fine.
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 |
|
| #
63e5fb76 |
| 24-Jul-2019 |
Jonas Devlieghere <[email protected]> |
[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)
This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style for
[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)
This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings.
So instead of writing:
if (log) log->Printf("%s\n", str);
You'd write:
LLDB_LOG(log, "%s\n", str);
This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it.
find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" +
Differential revision: https://reviews.llvm.org/D65128
llvm-svn: 366936
show more ...
|
|
Revision tags: llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
| #
5a2a0540 |
| 01-Jun-2019 |
Alexandre Ganea <[email protected]> |
Silence 'warning: extra ‘;’ [-Wpedantic]' with GCC 7.3
llvm-svn: 362306
|
| #
d5560951 |
| 30-May-2019 |
Antonio Afonso <[email protected]> |
Make ConnectionFileDescription work with all sockets
Summary: My main goal here is to make lldb-server work with Android Studio.
This is currently not the case because lldb-server is started in pla
Make ConnectionFileDescription work with all sockets
Summary: My main goal here is to make lldb-server work with Android Studio.
This is currently not the case because lldb-server is started in platform mode listening on a domain socket. When Android Studio connects to it lldb-server crashes because even though it's listening on a domain socket as soon as it gets a connection it asserts that it's a TCP connection, which will obviously fails for any non-tcp connection.
To do this I came up with a new method called GetConnectURI() in Socket that returns the URI needed to connect to the connected portion of the socket.
Reviewers: labath, clayborg, xiaobai
Reviewed By: labath
Subscribers: mgorny, jfb, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D62089
llvm-svn: 362173
show more ...
|
| #
248a1305 |
| 23-May-2019 |
Konrad Kleine <[email protected]> |
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codeba
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information.
This is the command I ran and I to fix and format the code base:
``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ```
NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
show more ...
|
|
Revision tags: llvmorg-8.0.1-rc1 |
|
| #
2819136f |
| 21-Mar-2019 |
Michal Gorny <[email protected]> |
[lldb] Add missing EINTR handling
Differential Revision: https://reviews.llvm.org/D59606
llvm-svn: 356703
|
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, 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 <[email protected]> |
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, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1 |
|
| #
b1cb0b79 |
| 10-Apr-2018 |
Nico Weber <[email protected]> |
s/LLVM_ON_WIN32/_WIN32/, lldb LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleL
s/LLVM_ON_WIN32/_WIN32/, lldb LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change.
llvm-svn: 329697
show more ...
|
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4 |
|
| #
c6f6aa44 |
| 29-Aug-2017 |
Chris Bieneman <[email protected]> |
[IPv6] Fix a bug in the IPv6 listen behavior
The socket bind address should either be localhost or anyaddress. This bug in the listen behavior was preventing lldb-server from opening sockets for non
[IPv6] Fix a bug in the IPv6 listen behavior
The socket bind address should either be localhost or anyaddress. This bug in the listen behavior was preventing lldb-server from opening sockets for non-localhost connections.
The added test verifies that opening an anyaddress socket works and has a non-zero port assignment.
This should resolve PR34183.
llvm-svn: 312008
show more ...
|
|
Revision tags: llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
| #
b6dbe9a9 |
| 18-Jul-2017 |
Pavel Labath <[email protected]> |
Clean up lldb-types.h
Summary: It defined a couple of types (condition_t) which we don't use anymore, as we have c++11 goodies now. I remove these definitions.
Also it unnecessarily included a coup
Clean up lldb-types.h
Summary: It defined a couple of types (condition_t) which we don't use anymore, as we have c++11 goodies now. I remove these definitions.
Also it unnecessarily included a couple of headers which weren't necessary for it's operation. I remove these, and place the includes in the relevant files (usually .cpp, usually in Host code) which use them. This allows us to reduce namespace pollution in most of the lldb files which don't need the OS-specific definitions.
Reviewers: zturner, jingham
Subscribers: ki.stfu, lldb-commits
Differential Revision: https://reviews.llvm.org/D35113
llvm-svn: 308304
show more ...
|