diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-27 08:30:43 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-27 08:46:38 +0200 |
commit | e273e7a9a85109bfe5bf5bc790f8c3b0b43f9c07 (patch) | |
tree | d2b47a0f629fec9ab59237d0ff6156fdb789ef7b /cpukit/libtrace | |
parent | record: Fix thread names on 64-bit targets (diff) | |
download | rtems-e273e7a9a85109bfe5bf5bc790f8c3b0b43f9c07.tar.bz2 |
record: Add data size to client
This is necessary to get the thread names properly on 32-bit and 64-bit
targets.
Update #3665.
Diffstat (limited to 'cpukit/libtrace')
-rw-r--r-- | cpukit/libtrace/record/record-client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/libtrace/record/record-client.c b/cpukit/libtrace/record/record-client.c index c26893ec4c..e1365fed6f 100644 --- a/cpukit/libtrace/record/record-client.c +++ b/cpukit/libtrace/record/record-client.c @@ -615,22 +615,26 @@ static rtems_record_client_status consume_init( ctx->todo = sizeof( ctx->item.format_32 ); ctx->pos = &ctx->item.format_32; ctx->consume = consume_32; + ctx->data_size = 4; break; case RTEMS_RECORD_FORMAT_LE_64: ctx->todo = sizeof( ctx->item.format_64 ); ctx->pos = &ctx->item.format_64; ctx->consume = consume_64; + ctx->data_size = 8; break; case RTEMS_RECORD_FORMAT_BE_32: ctx->todo = sizeof( ctx->item.format_32 ); ctx->pos = &ctx->item.format_32; ctx->consume = consume_swap_32; + ctx->data_size = 4; magic = __builtin_bswap32( magic ); break; case RTEMS_RECORD_FORMAT_BE_64: ctx->todo = sizeof( ctx->item.format_64 ); ctx->pos = &ctx->item.format_64; ctx->consume = consume_swap_64; + ctx->data_size = 8; magic = __builtin_bswap32( magic ); break; #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ @@ -638,23 +642,27 @@ static rtems_record_client_status consume_init( ctx->todo = sizeof( ctx->item.format_32 ); ctx->pos = &ctx->item.format_32; ctx->consume = consume_swap_32; + ctx->data_size = 4; magic = __builtin_bswap32( magic ); break; case RTEMS_RECORD_FORMAT_LE_64: ctx->todo = sizeof( ctx->item.format_64 ); ctx->pos = &ctx->item.format_64; ctx->consume = consume_swap_64; + ctx->data_size = 8; magic = __builtin_bswap32( magic ); break; case RTEMS_RECORD_FORMAT_BE_32: ctx->todo = sizeof( ctx->item.format_32 ); ctx->pos = &ctx->item.format_32; ctx->consume = consume_32; + ctx->data_size = 4; break; case RTEMS_RECORD_FORMAT_BE_64: ctx->todo = sizeof( ctx->item.format_64 ); ctx->pos = &ctx->item.format_64; ctx->consume = consume_64; + ctx->data_size = 8; break; #else #error "unexpected __BYTE_ORDER__" |