Fixed bug

[ 766020 ] info registers / dump_cpu get old eflags
This commit is contained in:
Stanislav Shwartsman 2004-09-30 16:50:03 +00:00
parent 0732c5e698
commit a21018e1db
2 changed files with 9 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: debugstuff.cc,v 1.31 2003-12-24 20:32:59 sshwarts Exp $
// $Id: debugstuff.cc,v 1.32 2004-09-30 16:50:03 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -321,15 +321,12 @@ BX_CPU_C::dbg_query_pending(void)
return(ret);
}
Bit32u
BX_CPU_C::dbg_get_eflags(void)
{
return(BX_CPU_THIS_PTR eflags.val32);
return (BX_CPU_THIS_PTR read_eflags());
}
Bit32u
BX_CPU_C::dbg_get_descriptor_l(bx_descriptor_t *d)
{
@ -666,7 +663,6 @@ BX_CPU_C::dbg_set_cpu(bx_dbg_cpu_t *cpu)
EIP = cpu->eip;
// CS:
BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value = cpu->cs.sel;
BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.index = cpu->cs.sel >> 3;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: flag_ctrl_pro.cc,v 1.15 2004-08-13 20:00:03 sshwarts Exp $
// $Id: flag_ctrl_pro.cc,v 1.16 2004-09-30 16:50:03 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -95,9 +95,7 @@ BX_CPU_C::write_eflags(Bit32u eflags_raw, bx_bool change_IOPL, bx_bool change_IF
}
#endif /* BX_CPU_LEVEL >= 3 */
Bit16u
BX_CPU_C::read_flags(void)
Bit16u BX_CPU_C::read_flags(void)
{
Bit16u flags16;
@ -109,7 +107,8 @@ BX_CPU_C::read_flags(void)
(void) get_ZF();
(void) get_SF();
(void) get_OF();
}
}
flags16 = (Bit16u) BX_CPU_THIS_PTR eflags.val32;
/* 8086: bits 12-15 always set to 1.
@ -129,10 +128,8 @@ BX_CPU_C::read_flags(void)
return(flags16);
}
#if BX_CPU_LEVEL >= 3
Bit32u
BX_CPU_C::read_eflags(void)
Bit32u BX_CPU_C::read_eflags(void)
{
Bit32u flags32;
@ -144,7 +141,8 @@ BX_CPU_C::read_eflags(void)
(void) get_ZF();
(void) get_SF();
(void) get_OF();
}
}
flags32 = BX_CPU_THIS_PTR eflags.val32;
#if 0