35e8b1429a
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
24 lines
622 B
C
24 lines
622 B
C
#ifndef __DBGCHECK_H__
|
|
#define __DBGCHECK_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
#ifdef DEBUG
|
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
|
/* 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
|
|
|
|
|
|
#endif // #ifndef __DBGCHECK_H__
|