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 disassembly improvements #4380

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
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Next
builds) (maron2000)
- Fix day of week detection (INT 21h function 0x2Ah). (maron2000)
- Refine KEYB and CHCP command (maron2000)
- Use segment descriptor's big flag (if present) when disassembling code in
the debugger code view (cimarronm)
- Add decoding of rdmsr/wrmsr instructions to disassembler (cimarronm)
- 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)
Expand Down
7 changes: 6 additions & 1 deletion src/debug/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,12 @@ static void DrawCode(void) {
Bitu drawsize;

if (start != mem_no_address) {
drawsize=size=DasmI386(dline, (PhysPt)start, disEIP, cpu.code.big);
Descriptor desc;

if (cpu.gdt.GetDescriptor(codeViewData.useCS, desc))
drawsize=size=DasmI386(dline, (PhysPt)start, disEIP, desc.saved.seg.big);
else
drawsize=size=DasmI386(dline, (PhysPt)start, disEIP, cpu.code.big);
}
else {
drawsize=size=1;
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 @@ -290,7 +290,7 @@ static char const *second[] = {
"%x0", "%x0", "%x0", "%x0",
"%x0", "%x0", "%x0", "%x0",
/* 3 */
0, "rdtsc", 0, 0,
"wrmsr", "rdtsc", "rdmsr", 0,
"sysenter", "sysexit", 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
Expand Down