mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 14:18:20 +00:00
2009-02-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* shared/startup/bspgetworkarea.c: Add check to determine if current stack pointer is in work area.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-02-27 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* shared/startup/bspgetworkarea.c: Add check to determine if current
|
||||
stack pointer is in work area.
|
||||
|
||||
2009-02-26 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* shared/startup/bspgetworkarea.c: Make debug messages same as
|
||||
|
||||
@@ -50,11 +50,26 @@ void bsp_get_work_area(
|
||||
* you are allocating the Work Area in a new BSP.
|
||||
*/
|
||||
#ifdef BSP_GET_WORK_AREA_DEBUG
|
||||
printk( "work_area_start = %p\n", *work_area_start );
|
||||
printk( "work_area_size = %d 0x%08x\n", *work_area_size, *work_area_size );
|
||||
printk( "end = %p\n", *work_area_start + *work_area_size );
|
||||
printk( "heap_start = %p\n", *heap_start );
|
||||
printk( "heap_size = %d\n", *heap_size );
|
||||
{
|
||||
void *sp = __builtin_frame_address(0);
|
||||
void *end = *work_area_start + *work_area_size;
|
||||
printk(
|
||||
"work_area_start = 0x%p\n"
|
||||
"work_area_size = %d 0x%08x\n"
|
||||
"end = 0x%p\n"
|
||||
"heap_start = 0x%p\n"
|
||||
"heap_size = %d\n"
|
||||
"current stack pointer = 0x%p%s\n",
|
||||
*work_area_start,
|
||||
*work_area_size, /* decimal */
|
||||
*work_area_size, /* hexadecimal */
|
||||
end,
|
||||
*heap_start,
|
||||
*heap_size,
|
||||
sp,
|
||||
((sp >= *work_area_start && sp <= end) ? " OVERLAPS!" : "")
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user