gdb and segment registers

Pierre-Alexandre Meyer
Mon Feb 23 03:31:00 GMT 2009

Good evening,

  I am developing an application at the bootloader level that
eventually jumps into protected mode. My testing is done using a virtual
machine (tried via qemu and VMware Workstation) and remotely connecting
gdb (Ubuntu Intrepid build - 6.8-debian) to it.

It works great until the application jumps into protected mode when gdb
becomes really confused.

Setting a break point at the first function after protected mode doesn't

With no break points, if I SIGINT the program after the jump, gdb is

   Backtrace stopped: previous frame inner to this frame (corrupt

I suppose this is because the segment registers were changed. Do I need to
reload them somehow? I do have access to the registers but have no idea
how accurate they are. Is there a way to read the descriptor tables and
segment registers? This could help checking gdb's state.

Thank you.

(Please CC: me when replying, since I am not on the list)

Pierre-Alexandre Meyer

More information about the Gdb mailing list