Commit 03a6c510 authored by bellard's avatar bellard
Browse files

cannot simply write segment registers in system mode


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@431 c046a42c-6fe2-441c-8c8c-71466251a162
parent 128b346e
...@@ -368,6 +368,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port) ...@@ -368,6 +368,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port)
} }
env->eip = registers[8]; env->eip = registers[8];
env->eflags = registers[9]; env->eflags = registers[9];
#if defined(CONFIG_USER_ONLY)
#define LOAD_SEG(index, sreg)\ #define LOAD_SEG(index, sreg)\
if (tswapl(registers[index]) != env->segs[sreg].selector)\ if (tswapl(registers[index]) != env->segs[sreg].selector)\
cpu_x86_load_seg(env, sreg, tswapl(registers[index])); cpu_x86_load_seg(env, sreg, tswapl(registers[index]));
...@@ -377,6 +378,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port) ...@@ -377,6 +378,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port)
LOAD_SEG(13, R_ES); LOAD_SEG(13, R_ES);
LOAD_SEG(14, R_FS); LOAD_SEG(14, R_FS);
LOAD_SEG(15, R_GS); LOAD_SEG(15, R_GS);
#endif
#endif #endif
put_packet("OK"); put_packet("OK");
break; break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment