Build: pin nightly-2026-02-18; fix json target spec + function pointer casts#2
Merged
emilf merged 1 commit intopci-refinement-workfrom Feb 20, 2026
Merged
Conversation
emilf
pushed a commit
that referenced
this pull request
Mar 23, 2026
…ession
Implements a zero-manual-steps GDB debug workflow. No address copying,
no probe-then-restart, works reliably regardless of UEFI load address.
## Rust: debug mailbox (bootloader/src/main.rs, shared/src/constants.rs)
efi_main now writes its own runtime address to a fixed physical page at
boot entry, before any other UEFI calls:
physical 0x7000 + 0x00 u64 runtime efi_main address
physical 0x7000 + 0x08 u64 magic sentinel 0xDEADBEEF_CAFEF00D
The page is reserved via UEFI AllocateType::Address so the firmware
records our ownership in the memory map. The address and sentinel
constants live in shared/src/constants.rs::debug_mailbox.
## GDB: theseus-auto command (debug.gdb)
New 'theseus-auto' GDB command that:
1. Sets a hardware watchpoint on the magic sentinel at 0x7008
2. Issues 'continue' — UEFI boots, efi_main writes address then magic
3. Watchpoint fires: reads runtime efi_main from 0x7000
4. Calls theseus-load with the captured address (correct section deltas)
5. Returns to GDB prompt — execution is stopped inside efi_main with
full Rust source-level symbols
No reset required. The watchpoint catches efi_main on its first
execution. The user is dropped exactly at efi_main+81 with symbols.
## Python: gdb-auto.py updated (scripts/gdb-auto.py)
Simplified to a single-run workflow:
- Start QEMU running (not paused) with TCP GDB stub on :1251
- Connect GDB, run theseus-auto, wait for watchpoint + symbol load
- Drop into interactive GDB or report result (--no-interactive)
## Verified
Tested across multiple runs — efi_main loads at different addresses
each time (0x7d0e4873, 0x7d0d7873, 0x7d0d9873 etc.) and the watchpoint
correctly captures the address every run:
Thread 1 hit Hardware watchpoint 1: *(u64*)0x7008 == 0xdeadbeefcafef00d
theseus-auto: mailbox fired — runtime efi_main = 0x7d0e4873
rip = 0x7d0e48c4 <theseus_efi::efi_main+81>
#2 theseus_efi::efi_main at bootloader/src/main.rs:124
## Usage
make debug-auto # interactive session
make debug-auto-ci # CI smoke-test, exits after verify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.