summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/capture/capture-cli.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-08-05 15:48:01 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-09-05 06:50:29 -0500
commit2a86615b98ee22eb2cb664011f97ae3a4d07e294 (patch)
tree85efc211e857475d43746da23492b2500f9415f6 /cpukit/libmisc/capture/capture-cli.c
parentcapture: Split user extension methods out. (diff)
downloadrtems-2a86615b98ee22eb2cb664011f97ae3a4d07e294.tar.bz2
capture: Add support for variable length records.
Diffstat (limited to 'cpukit/libmisc/capture/capture-cli.c')
-rw-r--r--cpukit/libmisc/capture/capture-cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c
index 9c978d28d9..2aa7c9c229 100644
--- a/cpukit/libmisc/capture/capture-cli.c
+++ b/cpukit/libmisc/capture/capture-cli.c
@@ -1353,6 +1353,7 @@ rtems_capture_cli_trace_records (int argc,
int count;
uint32_t read;
rtems_capture_record_t* rec;
+ uint8_t* ptr;
int arg;
rtems_capture_time_t last_t = 0;
@@ -1408,9 +1409,11 @@ rtems_capture_cli_trace_records (int argc,
}
count = total < read ? total : read;
-
+ ptr = (uint8_t *) rec;
while (count--)
{
+ rec = (rtems_capture_record_t*) ptr;
+
if (csv)
fprintf (stdout, "%08" PRIxPTR ",%03" PRIu32
",%03" PRIu32 ",%04" PRIx32 ",%" PRId64 "\n",
@@ -1450,7 +1453,7 @@ rtems_capture_cli_trace_records (int argc,
event >>= 1;
}
}
- rec++;
+ ptr += rec->size;
}
count = total < read ? total : read;