Commit 03a6c5103d1a4c139cc28c8bb05a5752df4ee200

Authored by bellard
1 parent 128b346e

cannot simply write segment registers in system mode


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@431 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 0 deletions
gdbstub.c
@@ -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)
368 } 368 }
369 env->eip = registers[8]; 369 env->eip = registers[8];
370 env->eflags = registers[9]; 370 env->eflags = registers[9];
  371 +#if defined(CONFIG_USER_ONLY)
371 #define LOAD_SEG(index, sreg)\ 372 #define LOAD_SEG(index, sreg)\
372 if (tswapl(registers[index]) != env->segs[sreg].selector)\ 373 if (tswapl(registers[index]) != env->segs[sreg].selector)\
373 cpu_x86_load_seg(env, sreg, tswapl(registers[index])); 374 cpu_x86_load_seg(env, sreg, tswapl(registers[index]));
@@ -378,6 +379,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port) @@ -378,6 +379,7 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port)
378 LOAD_SEG(14, R_FS); 379 LOAD_SEG(14, R_FS);
379 LOAD_SEG(15, R_GS); 380 LOAD_SEG(15, R_GS);
380 #endif 381 #endif
  382 +#endif
381 put_packet("OK"); 383 put_packet("OK");
382 break; 384 break;
383 case 'm': 385 case 'm':