i8086 debugging issues.

Scott Robinson scott_gdb@scott.tranzoa.net
Thu Sep 22 04:10:00 GMT 2005


I am attempting to debug i8086 (16-bit) code with gdb, but am running
into a problem. This problem occurs with the gdb remotes in both bochs
and qemu.

My issue is the program counter. Specifically, $pc is mapped to $eip -
which isn't strictly valid in 16-bit mode. To obtain information about
the actual current $pc, I need to perform the calculation manually.
(($cs << 4) + $eip)

Manually setting $pc causes the system to panic, obviously. :-(

In short, is there a way to make gdb cognizent of the segment registers?

Scott.

-- 
http://quadhome.com/            - Personal webpage
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/gdb/attachments/20050922/aae0c480/attachment.sig>


More information about the Gdb mailing list