Skip to content

Commit

Permalink
Merge pull request #4379 from cimarronm/debugger-fixes
Browse files Browse the repository at this point in the history
Debugger fixes
  • Loading branch information
joncampbell123 committed Jul 25, 2023
2 parents 78897bc + eec82ed commit 4df8ee1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Next
builds) (maron2000)
- Fix day of week detection (INT 21h function 0x2Ah). (maron2000)
- Refine KEYB and CHCP command (maron2000)
- Fix disassembly for far jmp/call decoding (cimarronm)
- Fix memory limits on expand-down segment descriptors (cimarronm)
- Bump tinyfiledialog to ver 3.13.3 (maron2000)
2023.05.01
- IMGMAKE will choose LBA partition types for 2GB or larger disk
Expand Down
3 changes: 2 additions & 1 deletion src/debug/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ uint64_t LinMakeProt(uint16_t selector, uint32_t offset)

if (cpu.gdt.GetDescriptor(selector,desc)) {
if (selector >= 8 && desc.Type() != 0) {
if (offset <= desc.GetLimit())
if ( (!desc.GetExpandDown() && offset <= desc.GetLimit()) ||
( desc.GetExpandDown() && offset > desc.GetLimit()) )
return desc.GetBase()+(uint64_t)offset;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/debug/debug_disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ static void percent(char type, char subtype)

switch (type) {
case 'A': /* direct address */
outhex(subtype, extend, 0, addrsize, 0);
outhex(subtype, extend, 0, opsize, 0);
break;

case 'C': /* reg(r/m) picks control reg */
Expand Down

0 comments on commit 4df8ee1

Please sign in to comment.