Now, my i386 knowledge is a bit rusty. But:
+static CORE_ADDR
+i386_read_pc (ptid_t ptid)
+{
+ CORE_ADDR pc = read_register_pid (PC_REGNUM, ptid);
+ if (i386_real_mode_p)
+ {
+ CORE_ADDR cs = read_register_pid (CS_REGNUM, ptid);
+ pc = pc + (cs << 4);
+ }
+ return pc;
+}
+
+static void
+i386_write_pc (CORE_ADDR pc, ptid_t ptid)
+{
+ if (i386_real_mode_p)
+ {
+ CORE_ADDR cs = read_register_pid (CS_REGNUM, ptid);
+ pc = pc - (cs << 4);
+ }
+ write_register_pid (PC_REGNUM, pc, ptid);
+}
+
Left shift of _four_? Surely the PC is more than four bits.
It is. From an ia32 manual (www.intel.com):