Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf2c should show BPF assembly not names of uBPF specific macros, in comments #3176

Open
dthaler opened this issue Jan 16, 2024 · 2 comments
Labels
blocked Blocked on another issue that must be done first enhancement New feature or request help wanted Extra attention is needed triaged Discussed in a triage meeting
Milestone

Comments

@dthaler
Copy link
Collaborator

dthaler commented Jan 16, 2024

Describe the feature you'd like supported

Today bpf2c generteas comments like:

// EBPF_OP_ADD64_IMM pc=526 dst=r1 src=r0 offset=0 imm=-1

whereas bpf assembly would be:

// add %r1, -1

The latter is more consistent with llvm-objdump, bpf_conformance, and other such tools.
It also avoids using a uBPF specific define (EBPF_OP_ADD64_IMM) in bpf2c which shouldn't depend on uBPF.

Proposed solution

Use BPF assembler syntax in comments instead

Additional context

No response

@dthaler dthaler added the enhancement New feature or request label Jan 16, 2024
@Alan-Jowett
Copy link
Member

Given that bpf_conformance has an assembler it probably makes sense to add the disassembler to bpf_conformance as well.

@Alan-Jowett
Copy link
Member

Created: Alan-Jowett/bpf_conformance#184 to track adding support for a disassembler.

@dahavey dahavey added triaged Discussed in a triage meeting help wanted Extra attention is needed labels Jan 22, 2024
@dahavey dahavey added this to the Backlog milestone Jan 22, 2024
@dahavey dahavey added the blocked Blocked on another issue that must be done first label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue that must be done first enhancement New feature or request help wanted Extra attention is needed triaged Discussed in a triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants