Repository navigation
Conversation
Use a dedicated qSBPFCallStack remote packet to recover return PCs and frame pointers held in the interpreter host-side call-frame array. Represent recovered frames with stable CFAs that account for SBPF's upward-growing stack, and expose historical PC and FP values through a read-only register context. Fall back to normal unwinding when the runtime does not implement the packet. Run Dexter against the coordinated Walnut SBPF and gdbstub branches, and make recovered Rust callers an expected pass. Document and test the binary protocol.
Use depth from the oldest physical frame to identify and order SBPF frames independently of guest stack direction or changes to r10. Keep native address-based identity and inline scope comparisons intact. Report CFA as unavailable instead of exposing an inverted frame pointer to DWARF expressions and the public API. Continue exposing the actual r10 through the register context without changing the remote packet. Cover dynamic and recursive stacks, CFA reporting, and stepping out in unit and API tests. Add a Rust recursion case and update the stepping expectation for distinct columns on the same source line. Run the new checks and SBPF runtime tests in the coordinated Dexter CI job.
|
Also please check this https://lldb.llvm.org/resources/lldbgdbremote.html#wasm-packets. |
|
Hm, I'm not sure this is the right design if it needs sBPF specific changes to LLDB to make this work. We can merge this in, of course, but I am suspicious that upstream1 will not want to take anything sBPF specific if there is a possibility of this being generally applicable to plain eBPF. Footnotes
|
That’s a fair concern, I am also in favour of finding a more general solution. I’ll investigate an alternative using DWARF CFI (the |
Recover SBPF interpreter caller frames through the
qSBPFCallStackremote protocol extension, following the WebAssembly approach. Preserve distinct recursive frames and support stepping out.Also, enable the Rust Dexter caller test.
Note: It requires the coordinated SBPF (anza-xyz/sbpf#239) and gdbstub changes.