<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Host/common/Socket.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>[ADT] Deprecate StringSwitch Cases with 3+ args. NFC. (#165119)</title>
<updated>2025-10-25T23:54:07+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-25T23:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3526bb099e79b1217bb8afbf9403b11528c384a6'/>
<id>3526bb099e79b1217bb8afbf9403b11528c384a6</id>
<content type='text'>
Suggest the `initializer_list` overload instead.

3+ args is an arbitrary number that allows for incremental depreciation
without having to update too many call sites.

For more context, see https://github.com/llvm/llvm-project/pull/163117.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggest the `initializer_list` overload instead.

3+ args is an arbitrary number that allows for incremental depreciation
without having to update too many call sites.

For more context, see https://github.com/llvm/llvm-project/pull/163117.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb-mcp] Launch lldb on demand, if needed. (#158701)</title>
<updated>2025-09-16T16:57:37+00:00</updated>
<author>
<name>John Harrison</name>
<email>harjohn@google.com</email>
</author>
<published>2025-09-16T16:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba5ca37f40b82e287a3e0469fb0f0ea48b651aca'/>
<id>ba5ca37f40b82e287a3e0469fb0f0ea48b651aca</id>
<content type='text'>
Adding support for launching lldb with `-O protocol start MCP` if a
valid ~/.lldb/lldb-mcp-*.json` file is not found.

---------

Co-authored-by: Jonas Devlieghere &lt;jonas@devlieghere.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for launching lldb with `-O protocol start MCP` if a
valid ~/.lldb/lldb-mcp-*.json` file is not found.

---------

Co-authored-by: Jonas Devlieghere &lt;jonas@devlieghere.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Adding pipe support to lldb_private::MainLoopWindows. (#145621)</title>
<updated>2025-07-01T15:59:27+00:00</updated>
<author>
<name>John Harrison</name>
<email>harjohn@google.com</email>
</author>
<published>2025-07-01T15:59:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1a7b7e24bcc1041ae0fb90abcfb73d36d76f4a07'/>
<id>1a7b7e24bcc1041ae0fb90abcfb73d36d76f4a07</id>
<content type='text'>
This updates MainLoopWindows to support events for reading from a pipe
(both anonymous and named pipes) as well as sockets.

This unifies both handle types using `WSAWaitForMultipleEvents` which
can listen to both sockets and handles for change events.

This should allow us to unify how we handle watching pipes/sockets on
Windows and Posix systems.

We can extend this in the future if we want to support watching other
types, like files or even other events like a process life time.

---------

Co-authored-by: Pavel Labath &lt;pavel@labath.sk&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates MainLoopWindows to support events for reading from a pipe
(both anonymous and named pipes) as well as sockets.

This unifies both handle types using `WSAWaitForMultipleEvents` which
can listen to both sockets and handles for change events.

This should allow us to unify how we handle watching pipes/sockets on
Windows and Posix systems.

We can extend this in the future if we want to support watching other
types, like files or even other events like a process life time.

---------

Co-authored-by: Pavel Labath &lt;pavel@labath.sk&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove child_process_inherit argument from Pipe (#145516)</title>
<updated>2025-06-26T11:51:14+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-06-26T11:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b77114b723eb68563a0900846df5bd1b454edc2f'/>
<id>b77114b723eb68563a0900846df5bd1b454edc2f</id>
<content type='text'>
It's not necessary on posix platforms as of #126935 and it's ignored on
windows as of #138896. For both platforms, we have a better way of
inheriting FDs/HANDLEs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not necessary on posix platforms as of #126935 and it's ignored on
windows as of #138896. For both platforms, we have a better way of
inheriting FDs/HANDLEs.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add Socket::CreatePair (#145015)</title>
<updated>2025-06-23T08:51:26+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-06-23T08:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c5629f2b600488e1aee3f8c9f2266523b460367f'/>
<id>c5629f2b600488e1aee3f8c9f2266523b460367f</id>
<content type='text'>
It creates a pair of connected sockets using the simplest mechanism for
the given platform (TCP on windows, socketpair(2) elsewhere).

Main motivation is to remove the ugly platform-specific code in
ProcessGDBRemote::LaunchAndConnectToDebugserver, but it can also be used
in other places where we need to create a pair of connected sockets.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It creates a pair of connected sockets using the simplest mechanism for
the given platform (TCP on windows, socketpair(2) elsewhere).

Main motivation is to remove the ugly platform-specific code in
ProcessGDBRemote::LaunchAndConnectToDebugserver, but it can also be used
in other places where we need to create a pair of connected sockets.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb-dap] Make connection URLs match lldb (#144770)</title>
<updated>2025-06-20T01:48:07+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-06-20T01:48:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f991cc99523e4bb7a0d96cee9f5c3a64bf2bc8e'/>
<id>4f991cc99523e4bb7a0d96cee9f5c3a64bf2bc8e</id>
<content type='text'>
Use the same scheme as ConnectionFileDescriptor::Connect and use
"listen" and "accept". Addresses feedback from a Pavel in a different PR
[1].

[1] https://github.com/llvm/llvm-project/pull/143628#discussion_r2152225200</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the same scheme as ConnectionFileDescriptor::Connect and use
"listen" and "accept". Addresses feedback from a Pavel in a different PR
[1].

[1] https://github.com/llvm/llvm-project/pull/143628#discussion_r2152225200</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Assorted improvements to the Pipe class (#128719)</title>
<updated>2025-02-27T10:15:59+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-02-27T10:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c0b5451129bba52e33cd7957d58af897a58d14c6'/>
<id>c0b5451129bba52e33cd7957d58af897a58d14c6</id>
<content type='text'>
The main motivation for this was the inconsistency in handling of
partial reads/writes between the windows and posix implementations
(windows was returning partial reads, posix was trying to fill the
buffer completely). I settle on the windows implementation, as that's
the more common behavior, and the "eager" version can be implemented on
top of that (in most cases, it isn't necessary, since we're writing just
a single byte).

Since this also required auditing the callers to make sure they're
handling partial reads/writes correctly, I used the opportunity to
modernize the function signatures as a forcing function. They now use
the `Timeout` class (basically an `optional&lt;duration&gt;`) to support both
polls (timeout=0) and blocking (timeout=nullopt) operations in a single
function, and use an `Expected` instead of a by-ref result to return the
number of bytes read/written.

As a drive-by, I also fix a problem with the windows implementation
where we were rounding the timeout value down, which meant that calls
could time out slightly sooner than expected.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The main motivation for this was the inconsistency in handling of
partial reads/writes between the windows and posix implementations
(windows was returning partial reads, posix was trying to fill the
buffer completely). I settle on the windows implementation, as that's
the more common behavior, and the "eager" version can be implemented on
top of that (in most cases, it isn't necessary, since we're writing just
a single byte).

Since this also required auditing the callers to make sure they're
handling partial reads/writes correctly, I used the opportunity to
modernize the function signatures as a forcing function. They now use
the `Timeout` class (basically an `optional&lt;duration&gt;`) to support both
polls (timeout=0) and blocking (timeout=nullopt) operations in a single
function, and use an `Expected` instead of a by-ref result to return the
number of bytes read/written.

As a drive-by, I also fix a problem with the windows implementation
where we were rounding the timeout value down, which meant that calls
could time out slightly sooner than expected.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Clean up Socket headers for Android (#124453)</title>
<updated>2025-01-28T02:11:27+00:00</updated>
<author>
<name>Brad Smith</name>
<email>brad@comstyle.com</email>
</author>
<published>2025-01-28T02:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=641694729df1564710c91d6778ca4f9c841b561a'/>
<id>641694729df1564710c91d6778ca4f9c841b561a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove support and workarounds for Android 4 and older (#124047)</title>
<updated>2025-01-23T17:54:35+00:00</updated>
<author>
<name>Brad Smith</name>
<email>brad@comstyle.com</email>
</author>
<published>2025-01-23T17:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff17a4136dedba004d901a571c4fae501affd051'/>
<id>ff17a4136dedba004d901a571c4fae501affd051</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove child_process_inherit from the socket classes (#117699)</title>
<updated>2024-11-28T07:27:36+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2024-11-28T07:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c1dff7152592f1beee9059ee8e2cb3cc68baea4d'/>
<id>c1dff7152592f1beee9059ee8e2cb3cc68baea4d</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
</feed>
