aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2015-12-23 16:19:45 +0100
committerMarc Schink <swo-dev@marcschink.de>2015-12-28 12:54:04 +0100
commit49799b2fbed7180a034875b34195b38db3dc5065 (patch)
tree4a37ce061040172b2dd7f46e56cbc9f305a64aa8
parentdf1ff24e0c45ae71cfdf8f1bd96258de14cc4e9f (diff)
Add filter shortcut for DWT packets
-rw-r--r--man/swodec.14
-rw-r--r--src/main.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/man/swodec.1 b/man/swodec.1
index 6cd1f88..01ca776 100644
--- a/man/swodec.1
+++ b/man/swodec.1
@@ -58,6 +58,10 @@ Instrumentation
Hardware source. This is for hardware source packets which could not be decoded
as Data Watchpoint and Trace (DWT) packets.
.TP
+.B dwt
+Data Watchpoint and Trace (DWT). This is a shortcut for \fBevcnt\fP,
+\fBexc\fP, \fBpc\fP, \fBdtpc\fP, \fBdtaddr\fP and \fBdtval\fP.
+.TP
.B evcnt
Event counter
.TP
diff --git a/src/main.c b/src/main.c
index eb33472..1e387a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -87,6 +87,13 @@ static gboolean parse_filter_option(const gchar *option_name,
tmp |= (1 << LIBSWO_PACKET_TYPE_INST);
} else if (!g_ascii_strcasecmp(tokens[i], "hw")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_HW);
+ } else if (!g_ascii_strcasecmp(tokens[i], "dwt")) {
+ tmp |= (1 << DWT_PACKET_TYPE_EVENT_COUNTER);
+ tmp |= (1 << DWT_PACKET_TYPE_EXCEPTION_TRACE);
+ tmp |= (1 << DWT_PACKET_TYPE_PC_SAMPLE);
+ tmp |= (1 << DWT_PACKET_TYPE_DT_PC_VALUE);
+ tmp |= (1 << DWT_PACKET_TYPE_DT_ADDR_OFFSET);
+ tmp |= (1 << DWT_PACKET_TYPE_DT_DATA_VALUE);
} else if (!g_ascii_strcasecmp(tokens[i], "evcnt")) {
tmp |= (1 << DWT_PACKET_TYPE_EVENT_COUNTER);
} else if (!g_ascii_strcasecmp(tokens[i], "exc")) {