Browse Source

etm: print something when trace buffer empty

ETM analyze produced no output when the trace buffer was empty.
This patch provides users with a clue.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
tags/v0.5.0-rc1
Jon Povey 14 years ago
committed by Øyvind Harboe
parent
commit
d944a0bed7
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/target/etm.c

+ 5
- 0
src/target/etm.c View File

@@ -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;


Loading…
Cancel
Save