aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2023-12-05 23:09:57 +0000
committerCupertino Miranda <cupertino.miranda@oracle.com>2023-12-07 10:55:55 +0000
commitd2ee8bb694500c9e460283f9078b7cc53362dc95 (patch)
tree8fad695c216fdb9568893ea1f82a74c82235feb8 /gdb/i386-tdep.c
parent708aee5ec64bea2c84449f63f3cdaa6d2b0b5892 (diff)
downloadgdb-d2ee8bb694500c9e460283f9078b7cc53362dc95.zip
gdb-d2ee8bb694500c9e460283f9078b7cc53362dc95.tar.gz
gdb-d2ee8bb694500c9e460283f9078b7cc53362dc95.tar.bz2
gdb/record: Support for rdtscp in i386_process_record.
This patch adds support for process recording of the instruction rdtscp in x86 architecture. Debugging applications with "record full" fail to record with the error message "Process record does not support instruction 0xf01f9". Approved-by: Guinevere Larsen <blarsen@redhat.com>
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index e00c3bd..e379c17 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -7008,6 +7008,9 @@ Do you want to stop the program?"),
goto no_support;
break;
+ case 0x0f01f9: /* rdtscp */
+ I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_RECX_REGNUM);
+ [[fallthrough]];
case 0x0f31: /* rdtsc */
I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
I386_RECORD_FULL_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
@@ -7117,6 +7120,11 @@ Do you want to stop the program?"),
case 0x0f01:
if (i386_record_modrm (&ir))
return -1;
+ if (ir.modrm == 0xf9)
+ {
+ opcode = (opcode << 8) | 0xf9;
+ goto reswitch;
+ }
switch (ir.reg)
{
case 0: /* sgdt */