btrace, pt: support new packets
authorMarkus Metzger <markus.t.metzger@intel.com>
Thu, 2 Jul 2015 13:16:09 +0000 (15:16 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Thu, 9 Jul 2015 06:03:10 +0000 (08:03 +0200)
Add support for dumping new Intel(R) Processor Trace packets in the
"maint btrace packet-history" command.

gdb/
* btrace.c (pt_print_packet): Print stop, vmcs, tma, mtc, cyc, and
mnt packets.

gdb/ChangeLog
gdb/btrace.c

index 1fcf223df286c568eef09db12236f3dc9c4b7f03..2e8de896aec587252cfb1fe7d860e24d0ad9b7bf 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-09  Markus Metzger  <markus.t.metzger@intel.com>
+
+       * btrace.c (pt_print_packet): Print stop, vmcs, tma, mtc, cyc, and
+       mnt packets.
+
 2015-07-09  Markus Metzger  <markus.t.metzger@intel.com>
 
        * btrace.c (btrace_pt_readmem_callback): Change type of PC argument.
index 1618e55f6646d6ff1f7d7c6f2ace7fe6375a36a9..731d2377fadc8d332ce211ee34ee4cb459c656eb 100644 (file)
@@ -2309,7 +2309,8 @@ pt_print_packet (const struct pt_packet *packet)
       break;
 
     case ppt_pip:
-      printf_unfiltered (("pip %" PRIx64 ""), packet->payload.pip.cr3);
+      printf_unfiltered (("pip %" PRIx64 "%s"), packet->payload.pip.cr3,
+                        packet->payload.pip.nr ? (" nr") : (""));
       break;
 
     case ppt_tsc:
@@ -2349,6 +2350,30 @@ pt_print_packet (const struct pt_packet *packet)
       printf_unfiltered (("ovf"));
       break;
 
+    case ppt_stop:
+      printf_unfiltered (("stop"));
+      break;
+
+    case ppt_vmcs:
+      printf_unfiltered (("vmcs %" PRIx64 ""), packet->payload.vmcs.base);
+      break;
+
+    case ppt_tma:
+      printf_unfiltered (("tma %x %x"), packet->payload.tma.ctc,
+                        packet->payload.tma.fc);
+      break;
+
+    case ppt_mtc:
+      printf_unfiltered (("mtc %x"), packet->payload.mtc.ctc);
+      break;
+
+    case ppt_cyc:
+      printf_unfiltered (("cyc %" PRIx64 ""), packet->payload.cyc.value);
+      break;
+
+    case ppt_mnt:
+      printf_unfiltered (("mnt %" PRIx64 ""), packet->payload.mnt.payload);
+      break;
     }
 }