Skip to content

debugger: expose SBPF interpreter call stack - #239

Open
djolertrk wants to merge 1 commit into
anza-xyz:mainfrom
walnuthq:feat/improve-bt
Open

djolertrk wants to merge 1 commit into
anza-xyz:mainfrom
walnuthq:feat/improve-bt

Conversation

@djolertrk

@djolertrk djolertrk commented Oct 6, 2026 •

Copy link
Copy Markdown

Upgrade gdbstub and implement its typed qSBPFCallStack extension so debugger clients can recover the active PC, saved return PCs, and r10 from interpreter state whose return addresses live outside guest memory.

Follow the WebAssembly qWasmCallStack approach: expose runtime-owned call frames through a dedicated remote protocol extension.

Exercise a real nested call through the remote protocol. Cover both dynamic-stack versions with recursive calls sharing return PCs and r10, callee adjustments to r10, and restoration of caller state on return. Use the same version-specific PC base for current and saved frames, including SBPFv3 virtual addresses. Extend the SBPFv3 protocol test to check caller PCs. Adapt reads and stepping to the current gdbstub API.

Consume the walnuthq/gdbstub feature branch until the extension is released upstream.

Upgrade gdbstub and implement its typed qSBPFCallStack extension so
debugger clients can recover the active PC, saved return PCs, and r10
from interpreter state whose return addresses live outside guest memory.

Follow the WebAssembly qWasmCallStack approach: expose runtime-owned
call frames through a dedicated remote protocol extension.

Exercise a real nested call through the remote protocol. Cover both
dynamic-stack versions with recursive calls sharing return PCs and r10,
callee adjustments to r10, and restoration of caller state on return.
Use the same version-specific PC base for current and saved frames,
including SBPFv3 virtual addresses. Extend the SBPFv3 protocol test to
check caller PCs. Adapt reads and stepping to the current gdbstub API.

Consume the walnuthq/gdbstub feature branch until the extension is
released upstream.
@djolertrk

Copy link
Copy Markdown
Author

cc @LucasSte @nagisa @Lichtso

@djolertrk

Copy link
Copy Markdown
Author

@djolertrk

Copy link
Copy Markdown
Author

Please check this as well: daniel5151/gdbstub#201 (comment)

FYI, walnut is interested in maintaining the gdbstub fork with Solana/SBPF related stuff.

This branch has not been deployed

No deployments
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