diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2018-07-05 10:57:52 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2018-07-05 10:57:52 +0000 |
commit | 2b39d0cd7c46b1e5f4cc7292bf9922a463a6f277 (patch) | |
tree | f56a7b87f9fee8eb4f81b3937c711e89eafef664 /src/VBox/Debugger/DBGCEmulateCodeView.cpp | |
parent | 2cecb0ab4b82a137412d72cc3343954da8f4dee5 (diff) | |
download | VirtualBox-svn-2b39d0cd7c46b1e5f4cc7292bf9922a463a6f277.tar.gz |
Debugger: Properly print the end of IRB/IOPB range in TSS. Also fixed display for ports not covered by IOPB.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@72914 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Debugger/DBGCEmulateCodeView.cpp')
-rw-r--r-- | src/VBox/Debugger/DBGCEmulateCodeView.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/VBox/Debugger/DBGCEmulateCodeView.cpp b/src/VBox/Debugger/DBGCEmulateCodeView.cpp index f4560a7be13..99a9d1022c2 100644 --- a/src/VBox/Debugger/DBGCEmulateCodeView.cpp +++ b/src/VBox/Debugger/DBGCEmulateCodeView.cpp @@ -4465,8 +4465,7 @@ static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUV iStart = i; } } - if (iStart != 255) - DBGCCmdHlpPrintf(pCmdHlp, "%02x-%02x %s\n", iStart, 255, fPrev ? "Protected mode" : "Redirected"); + DBGCCmdHlpPrintf(pCmdHlp, "%02x-%02x %s\n", iStart, 255, fPrev ? "Protected mode" : "Redirected"); } else DBGCCmdHlpPrintf(pCmdHlp, "Invalid interrupt redirection bitmap size: %u (%#x), expected 32 bytes.\n", @@ -4479,12 +4478,15 @@ static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUV } /* - * Dump the I/O permission bitmap if present. The IOPM cannot start below offset 0x64 + * Dump the I/O permission bitmap if present. The IOPM cannot start below offset 0x68 * (that applies to both 32-bit and 64-bit TSSs since their size is the same). + * Note that there is always one padding byte that is not technically part of the bitmap + * and "must have all bits set". It's not clear what happens when it doesn't. All ports + * not covered by the bitmap are considered to be not accessible. */ if (enmTssType != kTss16) { - if (offIoBitmap < cbTss && offIoBitmap >= 0x64) + if (offIoBitmap < cbTss && offIoBitmap >= 0x68) { uint32_t cPorts = RT_MIN((cbTss - offIoBitmap) * 8, _64K); DBGCVAR VarAddr; @@ -4495,9 +4497,9 @@ static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUV uint32_t iStart = 0; bool fPrev = ASMBitTest(pbIoBitmap, 0); uint32_t cLine = 0; - for (uint32_t i = 1; i < cPorts; i++) + for (uint32_t i = 1; i < _64K; i++) { - bool fThis = ASMBitTest(pbIoBitmap, i); + bool fThis = i < cPorts ? ASMBitTest(pbIoBitmap, i) : true; if (fThis != fPrev) { cLine++; @@ -4507,8 +4509,7 @@ static DECLCALLBACK(int) dbgcCmdDumpTSS(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUV iStart = i; } } - if (iStart != _64K-1) - DBGCCmdHlpPrintf(pCmdHlp, "%04x-%04x %s\n", iStart, _64K-1, fPrev ? "GP" : "OK"); + DBGCCmdHlpPrintf(pCmdHlp, "%04x-%04x %s\n", iStart, _64K-1, fPrev ? "GP" : "OK"); } else if (offIoBitmap > 0) DBGCCmdHlpPrintf(pCmdHlp, "No I/O bitmap (-%#x)\n", cbTssMin - offIoBitmap); |