<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.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>[lldb] Fix source line annotations for libsanitizers traces (#154247)</title>
<updated>2025-08-20T21:33:27+00:00</updated>
<author>
<name>Julian Lettner</name>
<email>yln@users.noreply.github.com</email>
</author>
<published>2025-08-20T21:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=484d0408f9d448ca57e96827bf8042acab999e38'/>
<id>484d0408f9d448ca57e96827bf8042acab999e38</id>
<content type='text'>
When providing allocation and deallocation traces,
the ASan compiler-rt runtime already provides call
addresses (`TracePCType::Calls`).

On Darwin, system sanitizers (libsanitizers)
provides return address.  It also discards a few
non-user frames at the top of the stack, because
these internal libmalloc/libsanitizers stack
frames do not provide any value when diagnosing
memory errors.

Introduce and add handling for
`TracePCType::ReturnsNoZerothFrame` to cover this
case and enable libsanitizers traces line-level
testing.

rdar://157596927

---
Commit 1 is a mechanical refactoring to introduce
and adopt `TracePCType` enum to replace
`pcs_are_call_addresses` bool.  It preserve the
current behavior:
```
pcs_are_call_addresses:
  false  -&gt;  TracePCType::Returns (default)
  true   -&gt;  TracePCType::Calls
``` 

Best reviewed commit by commit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When providing allocation and deallocation traces,
the ASan compiler-rt runtime already provides call
addresses (`TracePCType::Calls`).

On Darwin, system sanitizers (libsanitizers)
provides return address.  It also discards a few
non-user frames at the top of the stack, because
these internal libmalloc/libsanitizers stack
frames do not provide any value when diagnosing
memory errors.

Introduce and add handling for
`TracePCType::ReturnsNoZerothFrame` to cover this
case and enable libsanitizers traces line-level
testing.

rdar://157596927

---
Commit 1 is a mechanical refactoring to introduce
and adopt `TracePCType` enum to replace
`pcs_are_call_addresses` bool.  It preserve the
current behavior:
```
pcs_are_call_addresses:
  false  -&gt;  TracePCType::Returns (default)
  true   -&gt;  TracePCType::Calls
``` 

Best reviewed commit by commit.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] [darwin] Upstream a few DriverKit cases (#126604)</title>
<updated>2025-02-10T22:49:53+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-02-10T22:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d90399603c1db201be830a895f3b1324c4b30d07'/>
<id>d90399603c1db201be830a895f3b1324c4b30d07</id>
<content type='text'>
A DriverKit process is a kernel extension that runs in userland, instead
of running in the kernel address space/priv levels, they've been around
a couple of years. From lldb's perspective a DriverKit process is no
different from any other userland level process, but it has a different
Triple so we need to handle those cases in the lldb codebase. Some of
the DriverKit triple handling had been upstreamed to llvm-project, but I
noticed a few cases that had not yet. Cleaning that up.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A DriverKit process is a kernel extension that runs in userland, instead
of running in the kernel address space/priv levels, they've been around
a couple of years. From lldb's perspective a DriverKit process is no
different from any other userland level process, but it has a different
Triple so we need to handle those cases in the lldb codebase. Some of
the DriverKit triple handling had been upstreamed to llvm-project, but I
noticed a few cases that had not yet. Cleaning that up.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add SymbolContext::GetFunctionOrSymbolAddress (#123340)</title>
<updated>2025-02-06T08:12:44+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-02-06T08:12:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=feb5a77d700f46d6638f073d411cbe0d8a924fdf'/>
<id>feb5a77d700f46d6638f073d411cbe0d8a924fdf</id>
<content type='text'>
Many uses of SC::GetAddressRange were not interested in the range, but
in the address of the function/symbol contained inside the symbol
context. They were getting that by calling the GetBaseAddress on the
returned range, which worked well enough so far, but isn't compatible
with discontinuous functions, whose address (entry point) may not be the
lowest address in the range.

To resolve this problem, this PR creates a new function whose purpose is
return the address of the function or symbol inside the symbol context.
It also changes all of the callers of GetAddressRange which do not
actually care about the range to call this function instead.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many uses of SC::GetAddressRange were not interested in the range, but
in the address of the function/symbol contained inside the symbol
context. They were getting that by calling the GetBaseAddress on the
returned range, which worked well enough so far, but isn't compatible
with discontinuous functions, whose address (entry point) may not be the
lowest address in the range.

To resolve this problem, this PR creates a new function whose purpose is
return the address of the function or symbol inside the symbol context.
It also changes all of the callers of GetAddressRange which do not
actually care about the range to call this function instead.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Add a StackFrameRecognizer for the Darwin specific abort_with_payload… (#101365)</title>
<updated>2024-08-02T17:38:41+00:00</updated>
<author>
<name>jimingham</name>
<email>jingham@apple.com</email>
</author>
<published>2024-08-02T17:38:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7a7cb8156b0a85f1eca772329644cae5989d4ed1'/>
<id>7a7cb8156b0a85f1eca772329644cae5989d4ed1</id>
<content type='text'>
This is used by various system routines (the capabilities checker and
dyld to name a few) to add extra color to an abort. This patch adds a
frame recognizer so people can easily see the details, and also adds the
information to the ExtendedCrashInformation dictionary.

I also had to rework how the dictionary is held; previously it was
created on demand, but that was inconvenient since it meant all the
entries had to be produced at that same time. That didn't work for the
recognizer.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is used by various system routines (the capabilities checker and
dyld to name a few) to add extra color to an abort. This patch adds a
frame recognizer so people can easily see the details, and also adds the
information to the ExtendedCrashInformation dictionary.

I also had to rework how the dictionary is held; previously it was
created on demand, but that was inconvenient since it meant all the
entries had to be produced at that same time. That didn't work for the
recognizer.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Upstream the BridgeOS triple enum value (NFC)</title>
<updated>2024-02-19T20:20:23+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-19T20:16:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b26c25f7e56fe3d5e06c285566ef43812d7baee'/>
<id>1b26c25f7e56fe3d5e06c285566ef43812d7baee</id>
<content type='text'>
This upstreams the BridgeOS target triple enum value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This upstreams the BridgeOS target triple enum value.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Upstream xros support in lldb (#78389)</title>
<updated>2024-01-17T17:47:08+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-01-17T17:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b6a8f823bf873aa74cdb738f517e7333e20de7a'/>
<id>3b6a8f823bf873aa74cdb738f517e7333e20de7a</id>
<content type='text'>
Upstream support for debugging xros applications through LLDB.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream support for debugging xros applications through LLDB.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][NFC] Refactor `TagTypeKind` (#71160)</title>
<updated>2023-11-03T17:45:39+00:00</updated>
<author>
<name>Vlad Serebrennikov</name>
<email>serebrennikov.vladislav@gmail.com</email>
</author>
<published>2023-11-03T17:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=edd690b02e16e991393bf7f67631196942369aed'/>
<id>edd690b02e16e991393bf7f67631196942369aed</id>
<content type='text'>
This patch converts TagTypeKind into scoped enum. Among other benefits,
this allows us to forward-declare it where necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts TagTypeKind into scoped enum. Among other benefits,
this allows us to forward-declare it where necessary.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFCI] Remove use of ConstString in ProcessStructReader</title>
<updated>2023-06-16T17:53:24+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-06-14T22:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0b90d09898cadc89105c3caf0d01f09e66c49993'/>
<id>0b90d09898cadc89105c3caf0d01f09e66c49993</id>
<content type='text'>
std::map&lt;ConstString, FieldImpl&gt; is naturally replaced with
`llvm::StringMap&lt;FieldImpl&gt;` here.

Differential Revision: https://reviews.llvm.org/D152968
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
std::map&lt;ConstString, FieldImpl&gt; is naturally replaced with
`llvm::StringMap&lt;FieldImpl&gt;` here.

Differential Revision: https://reviews.llvm.org/D152968
</pre>
</div>
</content>
</entry>
<entry>
<title>We can't let GetStackFrameCount get interrupted or it will give the</title>
<updated>2023-05-11T21:48:54+00:00</updated>
<author>
<name>Jim Ingham</name>
<email>jingham@apple.com</email>
</author>
<published>2023-05-11T00:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e19387e6936c9ccc6200b32f3affea7b1020664c'/>
<id>e19387e6936c9ccc6200b32f3affea7b1020664c</id>
<content type='text'>
wrong answer. Plus, it's useful in some places to have a way to force
the full stack to be created even in the face of
interruption. Moreover, most of the time when you're just getting
frames, you don't need to know the number of frames in the stack to
start with. You just keep calling
Thread::GetStackFrameAtIndex(index++) and when you get a null
StackFrameSP back, you're done. That's also more amenable to
interruption if you are doing some work frame by frame.

So this patch makes GetStackFrameCount always return the full count,
suspending interruption. I also went through all the places that use
GetStackFrameCount to make sure that they really needed the full stack
walk. In many cases, they did not. For instance frame select -r 10 was
getting the number of frames just to check whether cur_frame_idx + 10
was within the stack. It's better in that case to see if that frame
exists first, since that doesn't force a full stack walk, and only
deal with walking off the end of the stack if it doesn't...

I also added a test for some of these behaviors.

Differential Revision: https://reviews.llvm.org/D150236
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
wrong answer. Plus, it's useful in some places to have a way to force
the full stack to be created even in the face of
interruption. Moreover, most of the time when you're just getting
frames, you don't need to know the number of frames in the stack to
start with. You just keep calling
Thread::GetStackFrameAtIndex(index++) and when you get a null
StackFrameSP back, you're done. That's also more amenable to
interruption if you are doing some work frame by frame.

So this patch makes GetStackFrameCount always return the full count,
suspending interruption. I also went through all the places that use
GetStackFrameCount to make sure that they really needed the full stack
walk. In many cases, they did not. For instance frame select -r 10 was
getting the number of frames just to check whether cur_frame_idx + 10
was within the stack. It's better in that case to see if that frame
exists first, since that doesn't force a full stack walk, and only
deal with walking off the end of the stack if it doesn't...

I also added a test for some of these behaviors.

Differential Revision: https://reviews.llvm.org/D150236
</pre>
</div>
</content>
</entry>
<entry>
<title>Return a shared_ptr from ScratchTypeSystemClang::GetForTarget()</title>
<updated>2023-01-09T23:04:53+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2023-01-09T22:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f8d7ab8cf8e859dcc7f696e8d01ed6fca502446a'/>
<id>f8d7ab8cf8e859dcc7f696e8d01ed6fca502446a</id>
<content type='text'>
The current interface theoretically could lead to a use-after-free
when a client holds on to the returned pointer. Fix this by returning
a shared_ptr to the scratch typesystem.

rdar://103619233

Differential Revision: https://reviews.llvm.org/D141100
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current interface theoretically could lead to a use-after-free
when a client holds on to the returned pointer. Fix this by returning
a shared_ptr to the scratch typesystem.

rdar://103619233

Differential Revision: https://reviews.llvm.org/D141100
</pre>
</div>
</content>
</entry>
</feed>
