Skip to content

Commit 3d6cc18

Browse files
committed
In GDB wire protocol, EFLAGS register is 32 bits.
Fixes #548.
1 parent 94a2a58 commit 3d6cc18

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

tenders/hvt/hvt_gdb_x86_64.h

+5-13
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,9 @@
2626
#define HVT_GDB_X86_64_H
2727

2828
/*
29-
* XXX: Can't find any gdb include file with the list of registers per
30-
* architecture (something like ia64_regs.h). The closest I can get is a
31-
* list of the registers from gdb (debugging an ordinary x86_64 binary):
32-
*
33-
* (gdb) info registers
34-
* rax 0x0 0
35-
* rbx 0x0 0
36-
* rcx 0x0 0
37-
* ...
38-
* fs 0x0 0
39-
* gs 0x0 0
40-
* (gdb)
29+
* XXX: While there is no header file in GDB to include here,
30+
* the register structure is described in XML here:
31+
* https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/features/i386/64bit-core.xml;h=5cbae2c0ef489699fa6c6e8ed07f5fe6d3b8a6b6;hb=HEAD
4132
*/
4233

4334
struct hvt_gdb_regs {
@@ -58,7 +49,8 @@ struct hvt_gdb_regs {
5849
uint64_t r14;
5950
uint64_t r15;
6051
uint64_t rip;
61-
uint64_t eflags;
52+
// In GDB wire protocol, EFLAGS is 32 bits.
53+
uint32_t eflags;
6254

6355
uint32_t cs;
6456
uint32_t ss;

0 commit comments

Comments
 (0)