Changeset 5b5dd1c8 in rtems


Ignore:
Timestamp:
Oct 10, 2009, 9:24:15 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6aa3ce3
Parents:
171bbec
Message:

2009-10-10 Joel Sherrill <joel.sherrill@…>

  • shared/bspgetworkarea.c: Add debug prints of memory information.
Location:
c/src/lib/libbsp/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/ChangeLog

    r171bbec r5b5dd1c8  
     12009-10-10      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * shared/bspgetworkarea.c: Add debug prints of memory information.
     4
    152009-09-29      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • c/src/lib/libbsp/sparc/shared/bspgetworkarea.c

    r171bbec r5b5dd1c8  
    1313 */
    1414
     15/* #define BSP_GET_WORK_AREA_DEBUG */
    1516#include <bsp.h>
    1617#include <bsp/bootcard.h>
     18#ifdef BSP_GET_WORK_AREA_DEBUG
     19  #include <rtems/bspIo.h>
     20#endif
    1721
    1822/* Tells us where to put the workspace in case remote debugger is present.  */
     
    3842  *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
    3943  *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
     44
     45  /*
     46   *  The following may be helpful in debugging what goes wrong when
     47   *  you are allocating the Work Area in a new BSP.
     48   */
     49  #ifdef BSP_GET_WORK_AREA_DEBUG
     50    {
     51      void *sp = __builtin_frame_address(0);
     52      void *end = *work_area_start + *work_area_size;
     53      printk(
     54        "work_area_start = 0x%p\n"
     55        "work_area_size = %d 0x%08x\n"
     56        "end = 0x%p\n"
     57        "heap_start = 0x%p\n"
     58        "heap_size = %d\n"
     59        "current stack pointer = 0x%p%s\n",
     60        *work_area_start,
     61        *work_area_size,  /* decimal */
     62        *work_area_size,  /* hexadecimal */
     63        end,
     64        *heap_start,
     65        *heap_size,
     66        sp,
     67        ((sp >= *work_area_start && sp <= end) ? " OVERLAPS!" : "")
     68     );
     69     printk( "rdb_start = 0x%08x\n", rdb_start );
     70   }
     71 #endif
    4072}
Note: See TracChangeset for help on using the changeset viewer.