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]

Re: [PATCH] Add xgetbv/xsetbv instructions support for precord.


Jiang Jilin wrote:
2009-10-09 Jiang Jilin <freephp@gmail.com>

	* i386-tdep.c (i386_process_record): Add xgetbv/xsetbv instructions support
---
 gdb/i386-tdep.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b79bcd2..1efe07f 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -5172,6 +5172,19 @@ reswitch:
 	  break;
 	  /* lgdt */
 	case 2:
+	  if (ir.mod == 3)
+	    {
+	      /* xgetbv */
+	      if (ir.rm == 0)
+		{
+		  I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
+		  I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
+		  break;
+		}
+	      /* xsetbv */
+	      else if (ir.rm == 1)
+		break;
+	    }
 	  /* lidt */
 	case 3:
 	  if (ir.mod == 3)

Jiang (is that how you would like to be addressed?)


This change looks OK to me in principle, but I'm not qualified
to judge its technical correctness.  I would like to get Hui
Zhu's opinion.

Nice job on the formatting and coding conventions!
;-)

Michael





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