Fix wrong address translation in debugger

This commit is contained in:
Stanislav Shwartsman 2011-06-24 13:05:36 +00:00
parent 598b15f080
commit 7e57d95364
2 changed files with 88 additions and 87 deletions

View File

@ -65,6 +65,7 @@ Bochs repository moved to the SVN version control !
from the "clock" setting)
- SF patches applied
[3327510] Fix wrong address translation in debugger by Jianan Hao
[3323758] Ctrl-Break support for the Win32 gui by Nikolay Nikolov
[3316785] Ctrl-Break support for the X11 gui by Nikolay Nikolov
[3298173] Breakpoint on VMEXIT event by Jianan Hao

View File

@ -1458,12 +1458,12 @@ bx_bool BX_CPU_C::dbg_translate_guest_physical(bx_phy_address guest_paddr, bx_ph
bx_bool BX_CPU_C::dbg_xlate_linear2phy(bx_address laddr, bx_phy_address *phy, bx_bool verbose)
{
if (! BX_CPU_THIS_PTR cr0.get_PG()) {
*phy = (bx_phy_address) laddr;
return 1;
}
bx_phy_address paddress;
if (! BX_CPU_THIS_PTR cr0.get_PG()) {
paddress = (bx_phy_address) laddr;
}
else {
bx_phy_address pt_address = BX_CPU_THIS_PTR cr3 & BX_CR3_PAGING_MASK;
// see if page is in the TLB first
@ -1571,7 +1571,7 @@ bx_bool BX_CPU_C::dbg_xlate_linear2phy(bx_address laddr, bx_phy_address *phy, bx
}
paddress = pt_address + (bx_phy_address)(laddr & offset_mask);
}
}
#if BX_SUPPORT_VMX >= 2
if (BX_CPU_THIS_PTR in_vmx_guest) {
if (SECONDARY_VMEXEC_CONTROL(VMX_VM_EXEC_CTRL3_EPT_ENABLE)) {