This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Save CS segment register for ljmp instruction


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]