This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20713] New: "layout asm" showing wrong disassembly
- From: "tiago4orion at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 18 Oct 2016 20:21:00 +0000
- Subject: [Bug gdb/20713] New: "layout asm" showing wrong disassembly
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20713
Bug ID: 20713
Summary: "layout asm" showing wrong disassembly
Product: gdb
Version: 7.12.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: tiago4orion at gmail dot com
Target Milestone: ---
When debugging a 16-bit real mode bootloader+OS with gdb + qemu, the "layout
asm" screen did not update correcly after a far jump.
Debugging the bootloader works great, the assembly shown in the "asm" windows
is correct, but after a far jump, the content of the window shows invalid
instructions (from invalid memory area), but when I step the code I can see the
correct instructions being executed by qemu (looking at the registers
updating).
Before the jump, I have cs=0x0, ip=0x7d5c and after the instruction I have
cs=0x900, ip=0x4. The instruction is:
jmp 0x900:0004 ;; the location of OS
The OS works as expected, but looking the asm of "layout asm window" it should
crash...
The "disas" command shows correct instructions at the address 0x9004... The
problem appears to be only with the asm window.
I'm starting gdb with the line below:
$ gdb -ex "target remote localhost:1234" \
-ex "set architecture i8086" \
-ex "set disassembly-flavor intel" \
-ex "layout asm" -x "layout regs" \
-ex "break *0x7c00" \
-ex "break *0x7d5c" # just before the far jump
--
You are receiving this mail because:
You are on the CC list for the bug.