2002-06-24 16:00:06 +00:00
|
|
|
#ifndef __DBGCHECK_H__
|
|
|
|
#define __DBGCHECK_H__
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2010-06-21 16:53:00 +00:00
|
|
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
2002-06-24 16:00:06 +00:00
|
|
|
/* check whether a function is inside the valid memory location */
|
|
|
|
#define IS_FUNCPTR(fp) ({/
|
|
|
|
extern char _text[];/
|
|
|
|
extern char _etext[];/
|
|
|
|
((((char *)(fp)) >= _text) && (((char *)(fp)) < _etext)/
|
|
|
|
})
|
|
|
|
#else
|
|
|
|
/* check whether a function is inside the valid memory location */
|
|
|
|
#define IS_FUNCPTR(fp) (((char*)(fp)) != NULL)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
/* check whether a function is inside the valid memory location */
|
|
|
|
#define IS_FUNCPRT (fp) true
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2010-06-21 16:53:00 +00:00
|
|
|
#endif // #ifndef __DBGCHECK_H__
|