Ticket #3240: 0001-libmisc-stackchk-check.c-correct-formatting-of-stack.patch

File 0001-libmisc-stackchk-check.c-correct-formatting-of-stack.patch, 1.4 KB (added by Andrei Chichak, on Nov 18, 2017 at 6:14:29 AM)
  • cpukit/libmisc/stackchk/check.c

    From c9568c3cdf1b06438a21a0e568f322a631a079a3 Mon Sep 17 00:00:00 2001
    From: Andrei Chichak <andrei@cbfsystems.com>
    Date: Fri, 17 Nov 2017 23:01:41 -0700
    Subject: [PATCH] libmisc/stackchk/check.c: correct formatting of stack
     pointers in Stack_check_Dump_threads_usage
    
    Pointers were being printed as 0x<decimal> rather than 0x<hex>. I altered the formatting define used
    to give the correct formatting.
    Close #3240
    ---
     cpukit/libmisc/stackchk/check.c | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
    index afc276165f..d19fef4dcf 100644
    a b static bool Stack_check_Dump_threads_usage( 
    407407
    408408  rtems_printf(
    409409    printer,
    410     "0x%08" PRIx32 " %-21s 0x%08" PRIuPTR " 0x%08" PRIuPTR " 0x%08" PRIuPTR " %6" PRId32 " ",
     410    "0x%08" PRIx32 " %-21s 0x%08" PRIxPTR " 0x%08" PRIxPTR " 0x%08" PRIxPTR " %6" PRId32 " ",
    411411    id,
    412412    name,
    413413    (uintptr_t) stack->area,
    void rtems_stack_checker_report_usage_with_plugin( 
    451451  rtems_printf(
    452452     printer,
    453453     "                             STACK USAGE BY THREAD\n"
    454      "ID         NAME                  LOW        HIGH       CURRENT    AVAIL  USED\n"
     454     "ID         NAME                  LOW        HIGH       CURRENT     AVAIL   USED\n"
    455455  );
    456456
    457457  /* iterate over all threads and dump the usage */