Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger fixes #4379

Merged
merged 4 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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