<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/tools/debugserver/source, 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>Clean up MachTask.mm's handling of m_exception_thread. (#167994)</title>
<updated>2025-11-14T18:14:28+00:00</updated>
<author>
<name>jimingham</name>
<email>jingham@apple.com</email>
</author>
<published>2025-11-14T18:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=420d56a3945588ca2141602c387c0feb3f358f47'/>
<id>420d56a3945588ca2141602c387c0feb3f358f47</id>
<content type='text'>
This was getting joined in ShutDownExcecptionThread (sic) but not
cleared. So this function was not safe to call twice, since you aren't
supposed to join a thread twice. Sadly, this was called in
MachTask::Clear and MachProcess::Destroy, which are both called when you
tell debugserver to detach.

This didn't seem to cause problems IRL, but the most recent ASAN detects
this as an error and calls ASAN::Die, which was causing all the tests
that ran detach to fail.

I fixed that by moving the clear &amp; test for m_exception_thread to
ShutDownExceptionThread. I also fixed the spelling of that routine. And
that routine was claiming to return a kern_return_t which no one was
checking. It actually returns a kern_return_t if there was a Mach
failure and a Posix error if there was a join failure. Since there's
really nothing you can do but exit if this fails, which is always what
you are in the process of doing when you call this, and since we have
already done all the useful logging in ShutDownExceptionThread, I just
removed the return value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was getting joined in ShutDownExcecptionThread (sic) but not
cleared. So this function was not safe to call twice, since you aren't
supposed to join a thread twice. Sadly, this was called in
MachTask::Clear and MachProcess::Destroy, which are both called when you
tell debugserver to detach.

This didn't seem to cause problems IRL, but the most recent ASAN detects
this as an error and calls ASAN::Die, which was causing all the tests
that ran detach to fail.

I fixed that by moving the clear &amp; test for m_exception_thread to
ShutDownExceptionThread. I also fixed the spelling of that routine. And
that routine was claiming to return a kern_return_t which no one was
checking. It actually returns a kern_return_t if there was a Mach
failure and a Posix error if there was a join failure. Since there's
really nothing you can do but exit if this fails, which is always what
you are in the process of doing when you call this, and since we have
already done all the useful logging in ShutDownExceptionThread, I just
removed the return value.</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver] Remove unnecessary sleep in MachProcess::AttachForDebug (#166674)</title>
<updated>2025-11-06T22:17:51+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-11-06T22:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa83723bbe55f2aee857438f8087c4fc0f52449e'/>
<id>fa83723bbe55f2aee857438f8087c4fc0f52449e</id>
<content type='text'>
Remove the unnecessary sleep in MachProcess::AttachForDebug. The
preceding comment makes it seem like it's necessary for synchronization,
though I don't believe that's the case (see below), and even if it were,
sleeping is not a reliable way to achieve that.

The reason I don't believe it's necessary is because after we return, we
synchronize with the exception thread on a state change. The latter will
call and update the process state, which is exactly what we synchronize
on. I was able to verify that this is the first time we change the
process state: i.e., `GetState` doesn't return a different value before
and after the sleep.

On top of that, there are 3 more places where we call ptrace attach
(`PosixSpawnChildForPTraceDebugging`, `SBLaunchForDebug`, and
`BoardServiceLaunchForDebug`) where we don't sleep.

rdar://163952037</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the unnecessary sleep in MachProcess::AttachForDebug. The
preceding comment makes it seem like it's necessary for synchronization,
though I don't believe that's the case (see below), and even if it were,
sleeping is not a reliable way to achieve that.

The reason I don't believe it's necessary is because after we return, we
synchronize with the exception thread on a state change. The latter will
call and update the process state, which is exactly what we synchronize
on. I was able to verify that this is the first time we change the
process state: i.e., `GetState` doesn't return a different value before
and after the sleep.

On top of that, there are 3 more places where we call ptrace attach
(`PosixSpawnChildForPTraceDebugging`, `SBLaunchForDebug`, and
`BoardServiceLaunchForDebug`) where we don't sleep.

rdar://163952037</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver] Move constants into TaskPortForProcessID (NFC) (#166670)</title>
<updated>2025-11-06T00:32:36+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-11-06T00:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bd9030e762c0bd27f536a3e81d8e8e6c012b49d6'/>
<id>bd9030e762c0bd27f536a3e81d8e8e6c012b49d6</id>
<content type='text'>
I was looking at the calls to `usleep` in debugserver and noticed that
these default arguments are never overwritten. I converted them to
constants in the function, which makes it easier to reason about.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was looking at the calls to `usleep` in debugserver and noticed that
these default arguments are never overwritten. I converted them to
constants in the function, which makes it easier to reason about.</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver] Fix debugserver build on &lt; macOS 10.15 (#166599)</title>
<updated>2025-11-05T18:32:38+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-11-05T18:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bc55f4f4f2b4ef196cf3ec25f69dfbd9cd032237'/>
<id>bc55f4f4f2b4ef196cf3ec25f69dfbd9cd032237</id>
<content type='text'>
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends.
Support using the constant on older OSes.

Fixes #156144</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends.
Support using the constant on older OSes.

Fixes #156144</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][debugserver] fix typeo in SME ZA register</title>
<updated>2025-10-23T21:43:51+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-10-23T21:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d47873784174181f1d5837f1389d23afeead734c'/>
<id>d47873784174181f1d5837f1389d23afeead734c</id>
<content type='text'>
chunk enumeartions.  Noticed by David Spickett.
NFC--no machine with a ZA register large enough to use this exists
today.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
chunk enumeartions.  Noticed by David Spickett.
NFC--no machine with a ZA register large enough to use this exists
today.
</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver][NFC] Fix unused variable warning</title>
<updated>2025-10-20T20:46:56+00:00</updated>
<author>
<name>Felipe de Azevedo Piovezan</name>
<email>fpiovezan@apple.com</email>
</author>
<published>2025-10-20T20:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e9d67dc9c4788d39da3c5612565d6e603015715'/>
<id>9e9d67dc9c4788d39da3c5612565d6e603015715</id>
<content type='text'>
This variable is only read from.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This variable is only read from.
</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver] Implement MultiMemRead packet (#162670)</title>
<updated>2025-10-15T15:45:35+00:00</updated>
<author>
<name>Felipe de Azevedo Piovezan</name>
<email>fpiovezan@apple.com</email>
</author>
<published>2025-10-15T15:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5e668fe84f77599da10e90ebba09695445ead358'/>
<id>5e668fe84f77599da10e90ebba09695445ead358</id>
<content type='text'>
This commit implements, in debugserver, the packet as discussed in the
RFC [1].

[1]:
https://discourse.llvm.org/t/rfc-a-new-vectorized-memory-read-packet/88441</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit implements, in debugserver, the packet as discussed in the
RFC [1].

[1]:
https://discourse.llvm.org/t/rfc-a-new-vectorized-memory-read-packet/88441</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver][NFC] Make helper functions have internal linkage (#162307)</title>
<updated>2025-10-07T21:46:02+00:00</updated>
<author>
<name>Felipe de Azevedo Piovezan</name>
<email>fpiovezan@apple.com</email>
</author>
<published>2025-10-07T21:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=25933f62dc261c394361ff8b42f40196ee36f44e'/>
<id>25933f62dc261c394361ff8b42f40196ee36f44e</id>
<content type='text'>
This also allowed deleting unreachable code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also allowed deleting unreachable code.</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver][NFC] Add helper function for escaping special characters (#162297)</title>
<updated>2025-10-07T21:45:13+00:00</updated>
<author>
<name>Felipe de Azevedo Piovezan</name>
<email>fpiovezan@apple.com</email>
</author>
<published>2025-10-07T21:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ab7554ef6e1eb45791d047eb332837e6d7d603f'/>
<id>7ab7554ef6e1eb45791d047eb332837e6d7d603f</id>
<content type='text'>
This code was duplicated in multiple places and a subsequent patch will
need to do it again.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code was duplicated in multiple places and a subsequent patch will
need to do it again.</pre>
</div>
</content>
</entry>
<entry>
<title>[debugserver] Support for `qMemTags` packet (#160952)</title>
<updated>2025-10-02T20:57:40+00:00</updated>
<author>
<name>Julian Lettner</name>
<email>yln@users.noreply.github.com</email>
</author>
<published>2025-10-02T20:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f4784fd13fb77a609920a06af99c3602bdec530f'/>
<id>f4784fd13fb77a609920a06af99c3602bdec530f</id>
<content type='text'>
Support for `qMemTags` packet in debugserver which allows usage of
LLDB's `memory tag read` on Darwin.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support for `qMemTags` packet in debugserver which allows usage of
LLDB's `memory tag read` on Darwin.
</pre>
</div>
</content>
</entry>
</feed>
