Debugging Real-Mode Bootloader in GDB (CS Changed, Symbols Broken)

How to debug a hand-written x86 assembly bootloader with GDB symbols — even across far jumps and segment changes. The trick most tutorials skip.

August 2, 2025
Harrison Guo
Video by: HarrisonSecurityLab
Published on YouTube: 2025-08-02
Bootloader Real Mode GDB x86 Assembly Segment Registers Debugging

When CS changes mid-execution — for example, a far jump from your bootloader’s load address into your second-stage code — GDB’s symbol resolution silently breaks. You see addresses but no names, and stepping looks like it’s into the void.

This video shows the workflow that keeps symbols valid across segment changes: explicit symbol-file loads at the new segment base, plus the add-symbol-file trick that nobody writes down in tutorials.

🎧 More Ways to Consume This Content

Comments

This space is waiting for your voice.

Comments will be supported shortly. Stay connected for updates!

Preview of future curated comments

This section will display user comments from various platforms like X, Reddit, YouTube, and more. Comments will be curated for quality and relevance.