CS change from debugger could change CPL or CPU mode

This commit is contained in:
Stanislav Shwartsman 2009-12-28 10:56:23 +00:00
parent e59ff3d779
commit c82b66c847

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: debugstuff.cc,v 1.110 2009-12-27 16:38:09 sshwarts Exp $
// $Id: debugstuff.cc,v 1.111 2009-12-28 10:56:23 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2009 The Bochs Project
@ -337,10 +337,14 @@ bx_bool BX_CPU_C::dbg_set_sreg(unsigned sreg_no, bx_segment_reg_t *sreg)
{
if (sreg_no < 6) {
BX_CPU_THIS_PTR sregs[sreg_no] = *sreg;
if (sreg_no == BX_SEG_REG_CS)
if (sreg_no == BX_SEG_REG_CS) {
handleCpuModeChange();
#if BX_CPU_LEVEL >= 4 && BX_SUPPORT_ALIGNMENT_CHECK
handleAlignmentCheck(); // CPL was modified
#endif
invalidate_prefetch_q();
return 1;
return 1;
}
}
return 0;