From d944a0bed73c63fe52cf546a7121823318e8b593 Mon Sep 17 00:00:00 2001 From: Jon Povey Date: Mon, 31 May 2010 11:56:42 +0900 Subject: [PATCH] etm: print something when trace buffer empty MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ETM analyze produced no output when the trace buffer was empty. This patch provides users with a clue. Signed-off-by: Jon Povey Signed-off-by: Øyvind Harboe --- src/target/etm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/target/etm.c b/src/target/etm.c index 4f4bf9a4..61ee99a0 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -882,6 +882,11 @@ static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context * if (ctx->trace_depth == 0) ctx->capture_driver->read_trace(ctx); + if (ctx->trace_depth == 0) { + command_print(cmd_ctx, "Trace is empty."); + return ERROR_OK; + } + /* start at the beginning of the captured trace */ ctx->pipe_index = 0; ctx->data_index = 0; -- 2.39.5