<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/functionalities, branch users/mingmingl-llvm/samplefdo-profile-format</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][test] skip test `TestRerunAndExprDylib.py` on remote (#157916)</title>
<updated>2025-09-10T19:26:36+00:00</updated>
<author>
<name>Ebuka Ezike</name>
<email>yerimyah1@gmail.com</email>
</author>
<published>2025-09-10T19:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=55e99efdf1bdd7150f680eee171e0d867a0864c6'/>
<id>55e99efdf1bdd7150f680eee171e0d867a0864c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Re-enable `TestRerunAndExprDylib.py` (#157872)</title>
<updated>2025-09-10T16:23:17+00:00</updated>
<author>
<name>Ebuka Ezike</name>
<email>yerimyah1@gmail.com</email>
</author>
<published>2025-09-10T16:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f5315bd135b6e65ebfb0d27f6333501c3a4b32b3'/>
<id>f5315bd135b6e65ebfb0d27f6333501c3a4b32b3</id>
<content type='text'>
the `skipTestIfFn` requires a function that return a string to skip or
None to run the test. The `isUbuntu18_04` function returns a bool and
the test is skipped on all platforms.



https://github.com/llvm/llvm-project/blob/25ebdfe0ab202a6cb30232d84bc5838439fd67d5/lldb/packages/Python/lldbsuite/test/decorators.py#L145-L157</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the `skipTestIfFn` requires a function that return a string to skip or
None to run the test. The `isUbuntu18_04` function returns a bool and
the test is skipped on all platforms.



https://github.com/llvm/llvm-project/blob/25ebdfe0ab202a6cb30232d84bc5838439fd67d5/lldb/packages/Python/lldbsuite/test/decorators.py#L145-L157</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] StepUntil disable test for unsupported linkers. (#157474)</title>
<updated>2025-09-10T16:18:43+00:00</updated>
<author>
<name>Ebuka Ezike</name>
<email>yerimyah1@gmail.com</email>
</author>
<published>2025-09-10T16:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a65aca6201e2455f7627732f5b378028fe651dec'/>
<id>a65aca6201e2455f7627732f5b378028fe651dec</id>
<content type='text'>
`INSERT BEFORE` keyword is not supported in current versions gold and
mold linkers. Since we cannot confirm accurately what linker and version
is available on the system and when it will be supported. We test it
with a sample program using the script keywords.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`INSERT BEFORE` keyword is not supported in current versions gold and
mold linkers. Since we cannot confirm accurately what linker and version
is available on the system and when it will be supported. We test it
with a sample program using the script keywords.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFC] Update testsuite skip comment</title>
<updated>2025-09-09T23:47:26+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-09-09T23:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f3b7ad4859037254afc0ee6d938018376c7c03d3'/>
<id>f3b7ad4859037254afc0ee6d938018376c7c03d3</id>
<content type='text'>
to explain why the skip was added.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to explain why the skip was added.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Skip TestCortexMExceptionUnwind except Darwin</title>
<updated>2025-09-09T22:32:33+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-09-09T22:28:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e320d9bdd32e6c53bef05304fceb98f62c61bde3'/>
<id>e320d9bdd32e6c53bef05304fceb98f62c61bde3</id>
<content type='text'>
I'm getting a failure on one linux CI, lldb-remote-linux-ubuntu,
where the test of assertEqual(thread.GetNumFrames(), 6) fails
because the unwinder only has one frame, most likely the
target triple is not set to armv7m-apple-* so ABISysV_arm is
being used instead of ABIMacOSX_arm and the architecture default
unwind plans behave differently.  Possibly the frame pointer
register, or possibly the way the arch default unwind plans are
structured.

Skipping on linux for now until I can debug further.  Can repo on
Darwin by changing the binary.json `"triple": "armv7m-apple"` to
armv7m-linux.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm getting a failure on one linux CI, lldb-remote-linux-ubuntu,
where the test of assertEqual(thread.GetNumFrames(), 6) fails
because the unwinder only has one frame, most likely the
target triple is not set to armv7m-apple-* so ABISysV_arm is
being used instead of ABIMacOSX_arm and the architecture default
unwind plans behave differently.  Possibly the frame pointer
register, or possibly the way the arch default unwind plans are
structured.

Skipping on linux for now until I can debug further.  Can repo on
Darwin by changing the binary.json `"triple": "armv7m-apple"` to
armv7m-linux.
</pre>
</div>
</content>
</entry>
<entry>
<title>NFC: SBThread should not be the one to compute StopReasonData. (#157577)</title>
<updated>2025-09-09T22:31:55+00:00</updated>
<author>
<name>jimingham</name>
<email>jingham@apple.com</email>
</author>
<published>2025-09-09T22:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2669fdeee295ebec5f4f8e7b7826c08d7191d838'/>
<id>2669fdeee295ebec5f4f8e7b7826c08d7191d838</id>
<content type='text'>
This is something the StopInfo class manages, so it should be allowed to
compute this rather than having SBThread do so. This code just moves the
computation to methods in StopInfo. It is mostly NFC. The one change
that I actually had to adjust the tests for was a couple of tests that
were asking for the UnixSignal stop info data by asking for the data at
index 1. GetStopInfoDataCount returns 1 and we don't do 1 based indexing
so the test code was clearly wrong. But I don't think it makes sense to
perpetuate handing out the value regardless of what index you pass us.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is something the StopInfo class manages, so it should be allowed to
compute this rather than having SBThread do so. This code just moves the
computation to methods in StopInfo. It is mostly NFC. The one change
that I actually had to adjust the tests for was a couple of tests that
were asking for the UnixSignal stop info data by asking for the data at
index 1. GetStopInfoDataCount returns 1 and we don't do 1 based indexing
so the test code was clearly wrong. But I don't think it makes sense to
perpetuate handing out the value regardless of what index you pass us.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFC] add comment to new TestCortexMExceptionUnwind</title>
<updated>2025-09-09T21:27:25+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-09-09T21:26:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78dfbcaa7b32eaf5a4e5888a1728114984712a4b'/>
<id>78dfbcaa7b32eaf5a4e5888a1728114984712a4b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Unwind through ARM Cortex-M exceptions automatically (#153922)</title>
<updated>2025-09-09T21:11:39+00:00</updated>
<author>
<name>Jason Molenda</name>
<email>jmolenda@apple.com</email>
</author>
<published>2025-09-09T21:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=69511ae80480815385abef7dfa095a8bd2961144'/>
<id>69511ae80480815385abef7dfa095a8bd2961144</id>
<content type='text'>
When a processor faults/is interrupted/gets an exception, it will stop
running code and jump to an exception catcher routine. Most processors
will store the pc that was executing in a system register, and the
catcher functions have special instructions to retrieve that &amp; possibly
other registers. It may then save those values to stack, and the author
can add .cfi directives to tell lldb's unwinder where to find those
saved values.

ARM Cortex-M (microcontroller) processors have a simpler mechanism where
a fixed set of registers are saved to the stack on an exception, and a
unique value is put in the link register to indicate to the caller that
this has taken place. No special handling needs to be written into the
exception catcher, unless it wants to inspect these preserved values.
And it is possible for a general stack walker to walk the stack with no
special knowledge about what the catch function does.

This patch adds an Architecture plugin method to allow an Architecture
to override/augment the UnwindPlan that lldb would use for a stack
frame, given the contents of the return address register. It resembles a
feature where the LanguageRuntime can replace/augment the unwind plan
for a function, but it is doing it at offset by one level. The
LanguageRuntime is looking at the local register context and/or symbol
name to decide if it will override the unwind rules. For the Cortex-M
exception unwinds, we need to modify THIS frame's unwind plan if the
CALLER's LR had a specific value. RegisterContextUnwind has to retrieve
the caller's LR value before it has completely decided on the UnwindPlan
it will use for THIS stack frame.

This does mean that we will need one additional read of stack memory
than we currently do when unwinding, on Armv7 Cortex-M targets. The
unwinder walks the stack lazily, as stack frames are requested, and so
now if you ask for 2 stack frames, we will read enough stack to walk 2
frames, plus we will read one extra word of memory, the spilled LR value
from the stack. In practice, with 512-byte memory cache reads, this is
unlikely to be a real performance hit.

This PR includes a test with a yaml corefile description and a JSON
ObjectFile, incorporating all of the necessary stack memory and symbol
names from a real debug session I worked on. The architectural default
unwind plans are used for all stack frames except the 0th because
there's no instructions for the functions, and no unwind info. I may
need to add an encoding of unwind fules to ObjectFileJSON in the future
as we create more test cases like this.

This PR depends on the yaml2macho-core utility from
https://github.com/llvm/llvm-project/pull/153911 to run its API test.

rdar://110663219</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a processor faults/is interrupted/gets an exception, it will stop
running code and jump to an exception catcher routine. Most processors
will store the pc that was executing in a system register, and the
catcher functions have special instructions to retrieve that &amp; possibly
other registers. It may then save those values to stack, and the author
can add .cfi directives to tell lldb's unwinder where to find those
saved values.

ARM Cortex-M (microcontroller) processors have a simpler mechanism where
a fixed set of registers are saved to the stack on an exception, and a
unique value is put in the link register to indicate to the caller that
this has taken place. No special handling needs to be written into the
exception catcher, unless it wants to inspect these preserved values.
And it is possible for a general stack walker to walk the stack with no
special knowledge about what the catch function does.

This patch adds an Architecture plugin method to allow an Architecture
to override/augment the UnwindPlan that lldb would use for a stack
frame, given the contents of the return address register. It resembles a
feature where the LanguageRuntime can replace/augment the unwind plan
for a function, but it is doing it at offset by one level. The
LanguageRuntime is looking at the local register context and/or symbol
name to decide if it will override the unwind rules. For the Cortex-M
exception unwinds, we need to modify THIS frame's unwind plan if the
CALLER's LR had a specific value. RegisterContextUnwind has to retrieve
the caller's LR value before it has completely decided on the UnwindPlan
it will use for THIS stack frame.

This does mean that we will need one additional read of stack memory
than we currently do when unwinding, on Armv7 Cortex-M targets. The
unwinder walks the stack lazily, as stack frames are requested, and so
now if you ask for 2 stack frames, we will read enough stack to walk 2
frames, plus we will read one extra word of memory, the spilled LR value
from the stack. In practice, with 512-byte memory cache reads, this is
unlikely to be a real performance hit.

This PR includes a test with a yaml corefile description and a JSON
ObjectFile, incorporating all of the necessary stack memory and symbol
names from a real debug session I worked on. The architectural default
unwind plans are used for all stack frames except the 0th because
there's no instructions for the functions, and no unwind info. I may
need to add an encoding of unwind fules to ObjectFileJSON in the future
as we create more test cases like this.

This PR depends on the yaml2macho-core utility from
https://github.com/llvm/llvm-project/pull/153911 to run its API test.

rdar://110663219</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Prevent TestqOffsets.py picking up host binaries (#157432)</title>
<updated>2025-09-09T08:30:29+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-09-09T08:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=157e88637475b831e175b75f30cab9dd63eaeae1'/>
<id>157e88637475b831e175b75f30cab9dd63eaeae1</id>
<content type='text'>
Due to a fallback in GDBRemoteCommunicationClient.cpp, on Linux we will
assume a PID of 1 if the remote does not respond in some way that tells
us the real PID.

So if PID 1 happened to be a process that the current user could read,
we would try to debug that instead. On my current machine, PID 1 was
sshd run by root so we would ignore it. If I changed the fallback to
some process ID run by my user, the test would fail.

To prevent this, select the remote-linux platform before creating the
target. This means we won't attempt any host lookups.

Fixes #155895</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to a fallback in GDBRemoteCommunicationClient.cpp, on Linux we will
assume a PID of 1 if the remote does not respond in some way that tells
us the real PID.

So if PID 1 happened to be a process that the current user could read,
we would try to debug that instead. On my current machine, PID 1 was
sshd run by root so we would ignore it. If I changed the fallback to
some process ID run by my user, the test would fail.

To prevent this, select the remote-linux platform before creating the
target. This means we won't attempt any host lookups.

Fixes #155895</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][elf-core][ARM] Add support for VFP registers (#155956)</title>
<updated>2025-09-08T21:55:54+00:00</updated>
<author>
<name>Igor Kudrin</name>
<email>ikudrin@accesssoftek.com</email>
</author>
<published>2025-09-08T21:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8ec4d87550c01b06a9841014d901146874688894'/>
<id>8ec4d87550c01b06a9841014d901146874688894</id>
<content type='text'>
This patch loads values of the VFP registers from the NT_ARM_VFP note.

Note that a CORE/NT_FPREGSET note is typically present in core dump
files and is used to store the FPA registers. The FPA unit is rare and
obsolete; however, Linux creates the note even if the unit is absent.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch loads values of the VFP registers from the NT_ARM_VFP note.

Note that a CORE/NT_FPREGSET note is typically present in core dump
files and is used to store the FPA registers. The FPA unit is rare and
obsolete; however, Linux creates the note even if the unit is absent.</pre>
</div>
</content>
</entry>
</feed>
