Skip to content

Commit

Permalink
use printf format specifier for word type
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Jan 3, 2022
1 parent 2492e59 commit e660ed1
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions libsel4debug/src/bootinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,26 @@
void debug_print_bootinfo(seL4_BootInfo *info)
{

printf("Node %lu of %lu\n", (long)info->nodeID, (long)info->numNodes);
printf("IOPT levels: %u\n", (int)info->numIOPTLevels);
printf("IPC buffer: %p\n", info->ipcBuffer);
printf("Empty slots: [%lu --> %lu]\n", (long)info->empty.start, (long)info->empty.end);
printf("sharedFrames: [%lu --> %lu]\n", (long)info->sharedFrames.start, (long)info->sharedFrames.end);
printf("userImageFrames: [%lu --> %lu]\n", (long)info->userImageFrames.start, (long)info->userImageFrames.end);
printf("userImagePaging: [%lu --> %lu]\n", (long)info->userImagePaging.start, (long)info->userImagePaging.end);
printf("untypeds: [%lu --> %lu]\n", (long)info->untyped.start, (long)info->untyped.end);
printf("Initial thread domain: %u\n", (int)info->initThreadDomain);
printf("Initial thread cnode size: %u\n", (int)info->initThreadCNodeSizeBits);
printf("Node %"SEL4_PRIu_word" of %"SEL4_PRIu_word"\n",
info->nodeID, info->numNodes);
printf("IOPT levels: %"SEL4_PRIu_word"\n",
info->numIOPTLevels);
printf("IPC buffer: %p\n",
info->ipcBuffer);
printf("Empty slots: [%"SEL4_PRIu_word"--> %"SEL4_PRIu_word"]\n",
info->empty.start, info->empty.end);
printf("sharedFrames: [%"SEL4_PRIu_word" --> %"SEL4_PRIu_word"]\n",
info->sharedFrames.start, info->sharedFrames.end);
printf("userImageFrames: [%"SEL4_PRIu_word" --> %"SEL4_PRIu_word"]\n",
info->userImageFrames.start, info->userImageFrames.end);
printf("userImagePaging: [%"SEL4_PRIu_word" --> %"SEL4_PRIu_word"]\n",
info->userImagePaging.start, info->userImagePaging.end);
printf("untypeds: [%"SEL4_PRIu_word" --> %]\n",
info->untyped.start, info->untyped.end);
printf("Initial thread domain: %"SEL4_PRIu_word"\n",
info->initThreadDomain);
printf("Initial thread cnode size: %"SEL4_PRIu_word"\n",
info->initThreadCNodeSizeBits);
printf("List of untypeds\n");
printf("------------------\n");
printf("Paddr | Size | Device\n");
Expand All @@ -34,7 +44,9 @@ void debug_print_bootinfo(seL4_BootInfo *info)
int index = info->untypedList[i].sizeBits;
assert(index < ARRAY_SIZE(sizes));
sizes[index]++;
printf("%p | %zu | %d\n", (void *)info->untypedList[i].paddr, (size_t)info->untypedList[i].sizeBits,
printf("0x%"SEL4_PRIx_word" | %zu | %d\n",
info->untypedList[i].paddr,
(size_t)info->untypedList[i].sizeBits,
(int)info->untypedList[i].isDevice);
}

Expand Down

0 comments on commit e660ed1

Please sign in to comment.