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:
Joel Sherrill
2009-02-27 15:09:14 +00:00
parent 949166d6c0
commit 67cad729e6
2 changed files with 25 additions and 5 deletions

View File

@@ -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

View File

@@ -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
}