History log of /llvm-project/lldb/source/Host/common/Socket.cpp (Results 1 – 25 of 86)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 64169472 28-Jan-2025 Brad Smith <brad@comstyle.com>

[lldb] Clean up Socket headers for Android (#124453)


# ff17a413 23-Jan-2025 Brad Smith <brad@comstyle.com>

[lldb] Remove support and workarounds for Android 4 and older (#124047)


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# c1dff715 28-Nov-2024 Pavel Labath <pavel@labath.sk>

[lldb] Remove child_process_inherit from the socket classes (#117699)

It's never set to true. Also, using inheritable FDs in a multithreaded
process pretty much guarantees descriptor leaks. It's be

[lldb] Remove child_process_inherit from the socket classes (#117699)

It's never set to true. Also, using inheritable FDs in a multithreaded
process pretty much guarantees descriptor leaks. It's better to
explicitly pass a specific FD to a specific subprocess, which we already
mostly can do using the ProcessLaunchInfo FileActions.

show more ...


# 07238704 27-Nov-2024 Pavel Labath <pavel@labath.sk>

[lldb] Add timeout argument to Socket::Accept (#117691)

Allows us to stop waiting for a connection if it doesn't come in a
certain amount of time. Right now, I'm keeping the status quo (infitnite

[lldb] Add timeout argument to Socket::Accept (#117691)

Allows us to stop waiting for a connection if it doesn't come in a
certain amount of time. Right now, I'm keeping the status quo (infitnite
wait) in the "production" code, but using smaller (finite) values in
tests. (A lot of these tests create "loopback" connections, where a
really short wait is sufficient: on linux at least even a poll (0s wait)
is sufficient if the other end has connect()ed already, but this doesn't
seem to be the case on Windows, so I'm using a 1s wait in these cases).

show more ...


Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# ebbc9ed2 13-Sep-2024 Pavel Labath <pavel@labath.sk>

[lldb] Add a MainLoop version of DomainSocket::Accept (#108188)

To go along with the existing TCPSocket implementation.


# deeafeab 04-Sep-2024 Dmitry Vasilyev <dvassiliev@accesssoftek.com>

[lldb][NFC] Move few static helpers to the class Socket (#106640)

Fixed a typo in Socket::SetOption().


Revision tags: llvmorg-19.1.0-rc4
# de687eac 27-Aug-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Update Host/windows to new Status API


# 0642cd76 27-Aug-2024 Adrian Prantl <aprantl@apple.com>

[lldb] Turn lldb_private::Status into a value type. (#106163)

This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
ant

[lldb] Turn lldb_private::Status into a value type. (#106163)

This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

` ResultTy DoFoo(Status& error)
`
to

` llvm::Expected<ResultTy> DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.

show more ...


# 06ccd32b 26-Aug-2024 Dmitry Vasilyev <dvassiliev@accesssoftek.com>

[lldb][NFC] Moved the SharedSocket class to Socket.* (#104787)

This is the prerequisite for #104238.


Revision tags: llvmorg-19.1.0-rc3
# 899a3df0 16-Aug-2024 Dmitry Vasilyev <dvassiliev@accesssoftek.com>

[lldb][NFC] Moved FindSchemeByProtocol() from Acceptor to Socket (#104439)

This is the prerequisite for #104238.


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# af318833 23-May-2024 Adrian Prantl <aprantl@apple.com>

Add a createError variant without error code (NFC) (#93209)

For the significant amount of call sites that want to create an
incontrovertible error, such a wrapper function creates a significant
re

Add a createError variant without error code (NFC) (#93209)

For the significant amount of call sites that want to create an
incontrovertible error, such a wrapper function creates a significant
readability improvement and lowers the cost of entry to add error
handling in more places.

show more ...


Revision tags: 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
# 300c5aaa 07-Aug-2023 Jonas Devlieghere <jonas@devlieghere.com>

[lldb] Remove unused Socket::PreDisconnect (NFC)


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init
# a11efd49 17-Jun-2023 Elliot Goodrich <elliotgoodrich@gmail.com>

Add missing StringExtras.h includes

In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includ

Add missing StringExtras.h includes

In preparation for removing the `#include "llvm/ADT/StringExtras.h"`
from the header to source file of `llvm/Support/Error.h`, first add in
all the missing includes that were previously included transitively
through this header.

This is fixing all files missed in b0abd4893fa1 and
39d8e6e22cd1.

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

show more ...


Revision tags: 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, llvmorg-14.0.0-rc1
# c34698a8 03-Feb-2022 Pavel Labath <pavel@labath.sk>

[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 <pavel@labath.sk>

[lldb] Convert "LLDB" log channel to the new API


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 75e164f6 20-Jan-2022 serge-sans-paille <sguelton@redhat.com>

[llvm] Cleanup header dependencies in ADT and Support

The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. R

[llvm] Cleanup header dependencies in ADT and Support

The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
is generally considered a good thing, but this may break downstream builds.
I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
as 3.

Notable changes:

- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h

You may need to add some of these headers in your compilation units, if needs be.

As an hint to the impact of the cleanup, running

clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 8000919 lines
after: 7917500 lines

Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831

show more ...


Revision tags: llvmorg-13.0.1-rc2
# 4f6d3a37 07-Jan-2022 Shafik Yaghmour <syaghmour@apple.com>

[LLDB] Fix setting of success in Socket::Close()

Both close and closesocket should return 0 on success so using !! looks incorrect. I replaced this will a more readable == 0 check.

Differential Rev

[LLDB] Fix setting of success in Socket::Close()

Both close and closesocket should return 0 on success so using !! looks incorrect. I replaced this will a more readable == 0 check.

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

show more ...


Revision tags: llvmorg-13.0.1-rc1
# e50f02ba 25-Oct-2021 Michał Górny <mgorny@moritz.systems>

[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse

Refactor ConnectionFileDescriptor to improve code reuse for different
types of sockets. Unify method naming.

While at it, remo

[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse

Refactor ConnectionFileDescriptor to improve code reuse for different
types of sockets. Unify method naming.

While at it, remove some (now-)dead code from Socket.

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

show more ...


# 073c5d0e 27-Oct-2021 Michał Górny <mgorny@moritz.systems>

[lldb] [Host/Socket] Make DecodeHostAndPort() return a dedicated struct

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


# 8dbbe335 27-Oct-2021 Med Ismail Bennani <medismail.bennani@gmail.com>

Revert "[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse"

This reverts commit e1acadb61dfc0810656219c6314019d5132f2c61.


# e1acadb6 25-Oct-2021 Michał Górny <mgorny@moritz.systems>

[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse

Refactor ConnectionFileDescriptor to improve code reuse for different
types of sockets. Unify method naming.

While at it, remo

[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse

Refactor ConnectionFileDescriptor to improve code reuse for different
types of sockets. Unify method naming.

While at it, remove some (now-)dead code from Socket.

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

show more ...


# 4373f359 23-Oct-2021 Michał Górny <mgorny@moritz.systems>

[lldb] [Host] Move port predicate-related logic to gdb-remote

Remove the port predicate from Socket and ConnectionFileDescriptor,
and move it to gdb-remote. It is specifically relevant to the threa

[lldb] [Host] Move port predicate-related logic to gdb-remote

Remove the port predicate from Socket and ConnectionFileDescriptor,
and move it to gdb-remote. It is specifically relevant to the threading
used inside gdb-remote and with the new port callback API, we can
reliably move it there. While at it, switch from the custom Predicate
to std::promise/std::future.

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

show more ...


# 93c1b3ca 05-Oct-2021 Pavel Labath <pavel@labath.sk>

[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 <mgorny@moritz.systems>

[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 <mgorny@moritz.systems>

Revert "[lldb] [Host] Refactor Socket::DecodeHostAndPort() to use LLVM API"

This reverts commit a6daf99228bc16fb7f2596d67a0d00fef327ace5. It causes
buildbot regressions, I'll investigate.


1234