mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 09:32:33 +03:00
[GDB] Zero-extend 16-bit segment registers
When the 16-bit segment registers are accessed using 32-bit instructions the high order bytes are undefined on older CPUs. We now explicitly zero the high order bytes when snapshotting the CPU state. This ensures that the GDB stub reports consistent values for the segment registers.
This commit is contained in:
committed by
Michael Brown
parent
5504fa9047
commit
3715c8c721
@@ -163,12 +163,18 @@ int_page_fault:
|
||||
#define IH_OFFSET_FLUX_END ( IH_OFFSET_END - 20 )
|
||||
do_interrupt:
|
||||
/* Store CPU state in GDB register snapshot */
|
||||
pushl %gs
|
||||
pushl %fs
|
||||
pushl %es
|
||||
pushl %ds
|
||||
pushl %ss
|
||||
pushl IH_OFFSET_FLUX_OLD_CS(%esp)
|
||||
pushw $0
|
||||
pushw %gs
|
||||
pushw $0
|
||||
pushw %fs
|
||||
pushw $0
|
||||
pushw %es
|
||||
pushw $0
|
||||
pushw %ds
|
||||
pushw $0
|
||||
pushw %ss
|
||||
pushw $0
|
||||
pushw IH_OFFSET_FLUX_OLD_CS + 2(%esp)
|
||||
pushl IH_OFFSET_FLUX_OLD_EFLAGS(%esp)
|
||||
pushl IH_OFFSET_FLUX_OLD_EIP(%esp)
|
||||
pushl %edi
|
||||
|
||||
Reference in New Issue
Block a user