Skip to content

Conversation

@procdump
Copy link

@procdump procdump commented Dec 17, 2025

The problem

When receving the target.xml from a gdb-remote it typically contains the architecture name the remote represents. This name is later used for finding the corresponding CoreDefiniton so that lldb would be able to set up the target accordingly:

const CoreDefinition *core_def = FindCoreDefinition(arch_name);

SBFv0-v4's CoreDefinitons are given name strings starting with sbfv*. Yet when invoking the parseBPFArch function it's the sbpfv* names that are compared against the provided ArchName in the attempt to return the most appropriate Triple:

ArchName == "sbpfv0" || ArchName == "sbpfv1" ||

Unittests for v0-v4 triples are only written for the sbpfv* cases:

T = Triple("sbpfv1-solana-solana");

To make matters worse if remote's target.xml contains, for example, <architecture>sbfv1</architecture> this later breaks lldb when trying to get the output of target dump typesystem.

What's changed

The aim of this patch is to prevent this confusion and align the names to using simply sbpf*. Structures and enums aren't touched.

…s the architecture name the remote represents. This name is later used for finding the corresponding `CoreDefiniton` so that `lldb` would be able to set up the target accordingly. SBFv0-v4's `CoreDefinitons` are given name strings starting with `sbfv*`. Yet when invoking the `parseBPFArch` function it's the `sbpfv*` names that are compared against the provided `ArchName` in the attempt to return the most appropriate `Triple`. Unittests for v0-v4 triples are only written for the `sbpfv*` cases. To make matters worse if remote's `target.xml` contains, for example, `<architecture>sbfv1</architecture>` this later breaks `lldb` when trying to get the output of `target dump typesystem`.

The aim of this patch is to prevent this confusion and align the names
to using simply sbpf*. Structures and Enums aren't touched.
@procdump procdump changed the title sbf / sbpf naming confusion [lldb] sbf / sbpf naming confusion Dec 17, 2025
@procdump procdump changed the title [lldb] sbf / sbpf naming confusion [SOL] [lldb] sbf / sbpf naming confusion Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant