<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/Platform/Linux/PlatformLinux.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][Platform Linux] Flip uid and pid in get signal description (#142200)</title>
<updated>2025-05-30T21:21:33+00:00</updated>
<author>
<name>Jacob Lalonde</name>
<email>jalalonde@fb.com</email>
</author>
<published>2025-05-30T21:21:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=513c1cdfaaa3432dc4674a2d3be3dcaec2b4343e'/>
<id>513c1cdfaaa3432dc4674a2d3be3dcaec2b4343e</id>
<content type='text'>
Despite a great review from @labath, I accidentally landed the signal
with the UID and PID properties flipped. I was actually trying to write
tests for this feature when I discovered it.

This fixes that bug, and add a shell test that runs only on Nix systems.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Despite a great review from @labath, I accidentally landed the signal
with the UID and PID properties flipped. I was actually trying to write
tests for this feature when I discovered it.

This fixes that bug, and add a shell test that runs only on Nix systems.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix Linux core file tests hanging on Windows (#142143)</title>
<updated>2025-05-30T13:14:38+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-05-30T13:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3745e051be6ff7c2464f775f06a71bee79eaf16f'/>
<id>3745e051be6ff7c2464f775f06a71bee79eaf16f</id>
<content type='text'>
After https://github.com/llvm/llvm-project/pull/141670, TestLinuxCore.py
was timing out on our Windows on Arm bot.

Non-Linux core files were ok, as were Linux core files unless it was
ppc64le, riscv64 or loongarch.

I eventually noticed that it was attempting to create PlatformLinux many
times before trying PlatformAndroid, PlatformMac etc., which it should
never need to do.

The tests passed on a Linux host too, to add to the mystery.

Turns out, all I needed to do was mark those architectures as supported
in the PlatformLinux constructor. If they're not listed there we get
stuck here:
```
    // Wait for a stopped event since we just posted one above...
	printf("waiting for process to stop...\n");
    lldb::EventSP event_sp;
    StateType state =
        WaitForProcessToStop(std::nullopt, &amp;event_sp, true, listener_sp,
                             nullptr, true, SelectMostRelevantFrame);
    printf("process stopped\n");
```
Waiting for a stop event that never comes, because it appears we try to
treat the core as a real process?
```
 DynamicLoaderPOSIXDYLD::virtual DynamicLoaderPOSIXDYLD::DidAttach pid 28147 executable '&lt;null executable&gt;', load_offset 0xffffffffffffffff
&lt;...&gt;
 Process::ShouldBroadcastEvent (000002ABC43FF4A0) Restarting process from state: stopped
 Process::PrivateResume() m_stop_id = 1, public state: unloaded private state: stopped
 Process::PrivateResume() got an error "error: elf-core does not support resuming processes".
 Process::ShouldBroadcastEvent (000002ABC43FF4A0) =&gt; new state: stopped, last broadcast state: invalid - NO
```
Some actionable feedback here would be nice, but all I care about for
now is that the tests run again.

I have not added riscv32 as that appears to only be supported for Darwin
at the moment (I expect someone will get burned by this when it is).

I think debug on these architectures worked if they were also the host
arch, if someone tried to remote debug them, I think it would have
failed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After https://github.com/llvm/llvm-project/pull/141670, TestLinuxCore.py
was timing out on our Windows on Arm bot.

Non-Linux core files were ok, as were Linux core files unless it was
ppc64le, riscv64 or loongarch.

I eventually noticed that it was attempting to create PlatformLinux many
times before trying PlatformAndroid, PlatformMac etc., which it should
never need to do.

The tests passed on a Linux host too, to add to the mystery.

Turns out, all I needed to do was mark those architectures as supported
in the PlatformLinux constructor. If they're not listed there we get
stuck here:
```
    // Wait for a stopped event since we just posted one above...
	printf("waiting for process to stop...\n");
    lldb::EventSP event_sp;
    StateType state =
        WaitForProcessToStop(std::nullopt, &amp;event_sp, true, listener_sp,
                             nullptr, true, SelectMostRelevantFrame);
    printf("process stopped\n");
```
Waiting for a stop event that never comes, because it appears we try to
treat the core as a real process?
```
 DynamicLoaderPOSIXDYLD::virtual DynamicLoaderPOSIXDYLD::DidAttach pid 28147 executable '&lt;null executable&gt;', load_offset 0xffffffffffffffff
&lt;...&gt;
 Process::ShouldBroadcastEvent (000002ABC43FF4A0) Restarting process from state: stopped
 Process::PrivateResume() m_stop_id = 1, public state: unloaded private state: stopped
 Process::PrivateResume() got an error "error: elf-core does not support resuming processes".
 Process::ShouldBroadcastEvent (000002ABC43FF4A0) =&gt; new state: stopped, last broadcast state: invalid - NO
```
Some actionable feedback here would be nice, but all I care about for
now is that the tests run again.

I have not added riscv32 as that appears to only be supported for Darwin
at the moment (I expect someone will get burned by this when it is).

I think debug on these architectures worked if they were also the host
arch, if someone tried to remote debug them, I think it would have
failed.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB] Add ifndef to platform linux (#141971)</title>
<updated>2025-05-29T18:20:05+00:00</updated>
<author>
<name>Jacob Lalonde</name>
<email>jalalonde@fb.com</email>
</author>
<published>2025-05-29T18:20:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=159646cd39eb6451c8906a999965e04d2566882f'/>
<id>159646cd39eb6451c8906a999965e04d2566882f</id>
<content type='text'>
Another iteration of fixes for #141670. Platform linux can be used by
other platforms, so we need to supply the signal values if they're not
defined.

Values are from the
[manpage](https://man7.org/linux/man-pages/man7/signal.7.html)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Another iteration of fixes for #141670. Platform linux can be used by
other platforms, so we need to supply the signal values if they're not
defined.

Values are from the
[manpage](https://man7.org/linux/man-pages/man7/signal.7.html)</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[LLDB][ELF Core] Support all the Generic (Negative) SI Codes." (#141670)</title>
<updated>2025-05-29T15:43:55+00:00</updated>
<author>
<name>Jacob Lalonde</name>
<email>jalalonde@fb.com</email>
</author>
<published>2025-05-29T15:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5fe9aea6d128a8569e27f8c66272e481f10c61ae'/>
<id>5fe9aea6d128a8569e27f8c66272e481f10c61ae</id>
<content type='text'>
After some debugging, I found out ProcessELFCore never updates the
platform. I've updated ProcessElfCore to set the arch and platform
before we parse the Notes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After some debugging, I found out ProcessELFCore never updates the
platform. I've updated ProcessElfCore to set the arch and platform
before we parse the Notes.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[LLDB][ELF Core] Support all the Generic (Negative) SI Codes." (#141645)</title>
<updated>2025-05-27T17:55:59+00:00</updated>
<author>
<name>Jacob Lalonde</name>
<email>jalalonde@fb.com</email>
</author>
<published>2025-05-27T17:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9d33b9291318c117429ab461c2119c108abd6ed2'/>
<id>9d33b9291318c117429ab461c2119c108abd6ed2</id>
<content type='text'>
Reverts llvm/llvm-project#140150

Broke the Darwin tests, but they pass on Linux. Reverting to make the
build healthy while I investigate</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#140150

Broke the Darwin tests, but they pass on Linux. Reverting to make the
build healthy while I investigate</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB][ELF Core] Support all the Generic (Negative) SI Codes. (#140150)</title>
<updated>2025-05-27T16:13:50+00:00</updated>
<author>
<name>Jacob Lalonde</name>
<email>jalalonde@fb.com</email>
</author>
<published>2025-05-27T16:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff7bb17c88328276323603809d5d4549ca8bd22b'/>
<id>ff7bb17c88328276323603809d5d4549ca8bd22b</id>
<content type='text'>
Recently, I was on an issue that generated a large number of Coredumps,
and every time in both LLDB and GDB the signal was just `SIGSEGV`.

This was frustrating because we would expect a `SIGSEGV` to have an
address, or ideally even bounds. After some digging I found the
`si_code` consistently was -6. With some help from
[@cdown](https://github.com/cdown), we found neither LLDB or GDB
supports the si_codes sent from [user
space](https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/siginfo.h#L185).

Excerpted from the sigaction man page.
```
       For a regular signal, the following list shows the values which
       can be placed in si_code for any signal, along with the reason
       that the signal was generated.
```

For which I added all of the si_codes to every Linux signal. Now for the
Coredump that triggered this whole investigation we get the accurate and
now very informative summary.

&lt;img width="524" alt="image"
src="https://github.com/user-attachments/assets/5149f781-ef21-4491-a077-8fac862fbc20"
/&gt;


Additionally from @labath's suggestion to move this to platform and
leverage the existing `getSiginfo()` call on thread, we can now inspect
the siginfo struct itself via `thread siginfo`. Giving us another
towards GDB parity on elf cores.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently, I was on an issue that generated a large number of Coredumps,
and every time in both LLDB and GDB the signal was just `SIGSEGV`.

This was frustrating because we would expect a `SIGSEGV` to have an
address, or ideally even bounds. After some digging I found the
`si_code` consistently was -6. With some help from
[@cdown](https://github.com/cdown), we found neither LLDB or GDB
supports the si_codes sent from [user
space](https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/siginfo.h#L185).

Excerpted from the sigaction man page.
```
       For a regular signal, the following list shows the values which
       can be placed in si_code for any signal, along with the reason
       that the signal was generated.
```

For which I added all of the si_codes to every Linux signal. Now for the
Coredump that triggered this whole investigation we get the accurate and
now very informative summary.

&lt;img width="524" alt="image"
src="https://github.com/user-attachments/assets/5149f781-ef21-4491-a077-8fac862fbc20"
/&gt;


Additionally from @labath's suggestion to move this to platform and
leverage the existing `getSiginfo()` call on thread, we can now inspect
the siginfo struct itself via `thread siginfo`. Giving us another
towards GDB parity on elf cores.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use UnwindPlan::Row as values (#131150)</title>
<updated>2025-03-19T11:22:26+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-03-19T11:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=571e4de02ee527ef6d0399008fb57440e51c5d22'/>
<id>571e4de02ee527ef6d0399008fb57440e51c5d22</id>
<content type='text'>
In most places, the rows are copied anyway (because they are generated
by cumulating modifications) immediately after adding them to the unwind
plans. In others, they can be moved into the unwind plan. This lets us
remove some backflip copies and make `const UnwindPlan` actually mean
something.

I've split this patch into two (and temporarily left both APIs) as this
patch was getting a bit big. This patch covers all the interesting
cases. Part two all about converting "architecture default" unwind plans
from ABI and InstructionEmulation plugins.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In most places, the rows are copied anyway (because they are generated
by cumulating modifications) immediately after adding them to the unwind
plans. In others, they can be moved into the unwind plan. This lets us
remove some backflip copies and make `const UnwindPlan` actually mean
something.

I've split this patch into two (and temporarily left both APIs) as this
patch was getting a bit big. This patch covers all the interesting
cases. Part two all about converting "architecture default" unwind plans
from ABI and InstructionEmulation plugins.</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][AArch64][NFC] Fix typo in get trap handler function</title>
<updated>2023-10-24T10:36:20+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-10-24T10:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=febc4ff74a4e0311c3663fa5d690c59f7f692583'/>
<id>febc4ff74a4e0311c3663fa5d690c59f7f692583</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFCI] TypeSystemClang::CreateStructForIdentifier should take a StringRef</title>
<updated>2023-07-03T16:35:24+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-06-26T20:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a2ff2921e84aa435e124ad275f70855a185cfb1c'/>
<id>a2ff2921e84aa435e124ad275f70855a185cfb1c</id>
<content type='text'>
This doesn't really use fast comparison or string uniqueness. In fact,
all of the current callers pass an empty string for type_name. The only
reason I don't remove it is because it looks like it is used downstream
for swift.

Differential Revision: https://reviews.llvm.org/D153810
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This doesn't really use fast comparison or string uniqueness. In fact,
all of the current callers pass an empty string for type_name. The only
reason I don't remove it is because it looks like it is used downstream
for swift.

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