[v2,2/6] btrace: Add printing support for cfe and evd packets.

Message ID 20240913125722.2145486-3-felix.willgerodt@intel.com
State New
Headers
Series btrace: Intel PT event tracing support |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Felix Willgerodt Sept. 13, 2024, 12:57 p.m. UTC
  ---
 gdb/btrace.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Patch

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 9dc0c5cc930..649e0ad59d7 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -2746,6 +2746,19 @@  pt_print_packet (const struct pt_packet *packet)
 		  packet->payload.ptw.ip ? (" ip") : (""));
       break;
 #endif /* defined (LIBIPT_VERSION >= 0x200)  */
+
+#if (LIBIPT_VERSION >= 0x201)
+    case ppt_cfe:
+      gdb_printf (("cfe %u: 0x%x%s"), packet->payload.cfe.type,
+		  packet->payload.cfe.vector,
+		  packet->payload.cfe.ip ? (" ip") : (""));
+      break;
+
+    case ppt_evd:
+      gdb_printf (("evd %u: 0x%" PRIx64 ""), packet->payload.evd.type,
+		  packet->payload.evd.payload);
+      break;
+#endif /* defined (LIBIPT_VERSION >= 0x201)  */
     }
 }