aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2017-10-03 12:31:02 +0200
committerMarc Schink <swo-dev@marcschink.de>2017-10-03 12:59:23 +0200
commit3bf686d82f69e3fc885d3d8fcca4bb37ca0371bf (patch)
tree5e86f44e7290086aef3a12c3b0a6f97f4affb867
parent14062338ded77433bd23f99a8d6b0fe3e8e6a802 (diff)
Update for libswo API changes
-rw-r--r--src/main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c
index b303c19..b24c8a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -106,7 +106,7 @@ static gboolean parse_filter_option(const gchar *option_name,
} else if (!g_ascii_strcasecmp(tokens[i], "sync")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_SYNC);
} else if (!g_ascii_strcasecmp(tokens[i], "of")) {
- tmp |= (1 << LIBSWO_PACKET_TYPE_OVERFLOW);
+ tmp |= (1 << LIBSWO_PACKET_TYPE_OF);
} else if (!g_ascii_strcasecmp(tokens[i], "lts")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_LTS);
} else if (!g_ascii_strcasecmp(tokens[i], "gts")) {
@@ -124,7 +124,7 @@ static gboolean parse_filter_option(const gchar *option_name,
tmp |= (1 << LIBSWO_PACKET_TYPE_HW);
} else if (!g_ascii_strcasecmp(tokens[i], "dwt")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EVTCNT);
- tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRACE);
+ tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRC);
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_PC_SAMPLE);
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_PC_VALUE);
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_ADDR_OFFSET);
@@ -132,7 +132,7 @@ static gboolean parse_filter_option(const gchar *option_name,
} else if (!g_ascii_strcasecmp(tokens[i], "evcnt")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EVTCNT);
} else if (!g_ascii_strcasecmp(tokens[i], "exc")) {
- tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRACE);
+ tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRC);
} else if (!g_ascii_strcasecmp(tokens[i], "pc")) {
tmp |= (1 << LIBSWO_PACKET_TYPE_DWT_PC_SAMPLE);
} else if (!g_ascii_strcasecmp(tokens[i], "dtpc")) {
@@ -397,28 +397,28 @@ static void handle_dwt_evtcnt_packet(const union libswo_packet *packet)
packet->evtcnt.fold, packet->evtcnt.cyc);
}
-static void handle_dwt_exctrace_packet(const union libswo_packet *packet)
+static void handle_dwt_exctrc_packet(const union libswo_packet *packet)
{
uint16_t exception;
const char *func;
const char *name;
char buf[23];
- switch (packet->exctrace.function) {
- case LIBSWO_EXCTRACE_FUNC_ENTER:
+ switch (packet->exctrc.function) {
+ case LIBSWO_EXCTRC_FUNC_ENTER:
func = "enter";
break;
- case LIBSWO_EXCTRACE_FUNC_EXIT:
+ case LIBSWO_EXCTRC_FUNC_EXIT:
func = "exit";
break;
- case LIBSWO_EXCTRACE_FUNC_RETURN:
+ case LIBSWO_EXCTRC_FUNC_RETURN:
func = "return";
break;
default:
func = "reserved";
}
- exception = packet->exctrace.exception;
+ exception = packet->exctrc.exception;
if (exception < NUM_EXCEPTION_NAMES) {
name = exception_names[exception];
@@ -480,7 +480,7 @@ static int packet_cb(struct libswo_context *ctx,
case LIBSWO_PACKET_TYPE_INST:
handle_inst_packet(packet);
break;
- case LIBSWO_PACKET_TYPE_OVERFLOW:
+ case LIBSWO_PACKET_TYPE_OF:
handle_overflow_packet(packet);
break;
case LIBSWO_PACKET_TYPE_EXT:
@@ -501,8 +501,8 @@ static int packet_cb(struct libswo_context *ctx,
case LIBSWO_PACKET_TYPE_DWT_EVTCNT:
handle_dwt_evtcnt_packet(packet);
break;
- case LIBSWO_PACKET_TYPE_DWT_EXCTRACE:
- handle_dwt_exctrace_packet(packet);
+ case LIBSWO_PACKET_TYPE_DWT_EXCTRC:
+ handle_dwt_exctrc_packet(packet);
break;
case LIBSWO_PACKET_TYPE_DWT_PC_SAMPLE:
handle_dwt_pc_sample_packet(packet);
@@ -618,7 +618,7 @@ int main(int argc, char **argv)
/* Disable packet filtering for all packet types by default. */
packet_type_filter = (1 << LIBSWO_PACKET_TYPE_UNKNOWN) | \
(1 << LIBSWO_PACKET_TYPE_SYNC) | \
- (1 << LIBSWO_PACKET_TYPE_OVERFLOW) | \
+ (1 << LIBSWO_PACKET_TYPE_OF) | \
(1 << LIBSWO_PACKET_TYPE_LTS) | \
(1 << LIBSWO_PACKET_TYPE_GTS1) | \
(1 << LIBSWO_PACKET_TYPE_GTS2) | \
@@ -626,7 +626,7 @@ int main(int argc, char **argv)
(1 << LIBSWO_PACKET_TYPE_INST) | \
(1 << LIBSWO_PACKET_TYPE_HW) | \
(1 << LIBSWO_PACKET_TYPE_DWT_EVTCNT) | \
- (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRACE) | \
+ (1 << LIBSWO_PACKET_TYPE_DWT_EXCTRC) | \
(1 << LIBSWO_PACKET_TYPE_DWT_PC_SAMPLE) | \
(1 << LIBSWO_PACKET_TYPE_DWT_PC_VALUE) | \
(1 << LIBSWO_PACKET_TYPE_DWT_ADDR_OFFSET) | \