This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Save CS segment register for ljmp instruction
- From: Jiang Jilin <freephp at gmail dot com>
- To: Hui Zhu <teawater at gmail dot com>, Michael Snyder <msnyder at vmware dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>, Jiang Jilin <freephp at gmail dot com>
- Date: Mon, 12 Oct 2009 10:24:42 +0800
- Subject: [PATCH] Save CS segment register for ljmp instruction
- References: <>
Hi Hui,
I think CS register should be stored for ljmp instruction, but I'm
not pretty sure, please help me confirm it.
Thanks!
2009-10-12 Jiang Jilin <freephp@gmail.com>
* i386-tdep.c (i386_process_record): Save CS segment register
for ljmp instruction
---
gdb/i386-tdep.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b4dc646..0145008 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -3606,8 +3606,11 @@ reswitch:
break;
/* jmp */
case 4:
+ I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
+ break;
/* ljmp */
case 5:
+ I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_CS_REGNUM);
I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_EFLAGS_REGNUM);
break;
/* push */
--
1.5.4.3