First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined. - Forward declare 'struct target_type_s' only, unless that symbol is defined. git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
4deb42ed00
commit
818aa27a9d
|
@ -26,6 +26,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm11.h"
|
#include "arm11.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm720t.h"
|
#include "arm720t.h"
|
||||||
#include "time_support.h"
|
#include "time_support.h"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm7tdmi.h"
|
#include "arm7tdmi.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm920t.h"
|
#include "arm920t.h"
|
||||||
#include "time_support.h"
|
#include "time_support.h"
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm926ejs.h"
|
#include "arm926ejs.h"
|
||||||
#include "time_support.h"
|
#include "time_support.h"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm966e.h"
|
#include "arm966e.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm9tdmi.h"
|
#include "arm9tdmi.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "avrt.h"
|
#include "avrt.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "cortex_a8.h"
|
#include "cortex_a8.h"
|
||||||
#include "target_request.h"
|
#include "target_request.h"
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "cortex_m3.h"
|
#include "cortex_m3.h"
|
||||||
#include "target_request.h"
|
#include "target_request.h"
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "arm926ejs.h"
|
#include "arm926ejs.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "mips32.h"
|
#include "mips32.h"
|
||||||
#include "mips_m4k.h"
|
#include "mips_m4k.h"
|
||||||
#include "mips32_dmaacc.h"
|
#include "mips32_dmaacc.h"
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "target_request.h"
|
#include "target_request.h"
|
||||||
#include "time_support.h"
|
#include "time_support.h"
|
||||||
|
|
|
@ -105,7 +105,8 @@ typedef struct working_area_s
|
||||||
struct working_area_s *next;
|
struct working_area_s *next;
|
||||||
} working_area_t;
|
} working_area_t;
|
||||||
|
|
||||||
typedef struct target_type_s
|
#ifdef DEFINE_TARGET_TYPE_S
|
||||||
|
struct target_type_s
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Name of the target. Do @b not access this field directly, use
|
* Name of the target. Do @b not access this field directly, use
|
||||||
|
@ -258,7 +259,11 @@ typedef struct target_type_s
|
||||||
int (*virt2phys)(struct target_s *target, u32 address, u32 *physical);
|
int (*virt2phys)(struct target_s *target, u32 address, u32 *physical);
|
||||||
int (*mmu)(struct target_s *target, int *enabled);
|
int (*mmu)(struct target_s *target, int *enabled);
|
||||||
|
|
||||||
} target_type_t;
|
};
|
||||||
|
#else
|
||||||
|
struct target_type_s;
|
||||||
|
#endif // DEFINE_TARGET_TYPE_S
|
||||||
|
typedef struct target_type_s target_type_t;
|
||||||
|
|
||||||
/* forward decloration */
|
/* forward decloration */
|
||||||
typedef struct target_event_action_s target_event_action_t;
|
typedef struct target_event_action_s target_event_action_t;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "target_request.h"
|
#include "target_request.h"
|
||||||
#include "binarybuffer.h"
|
#include "binarybuffer.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFINE_TARGET_TYPE_S
|
||||||
#include "xscale.h"
|
#include "xscale.h"
|
||||||
#include "arm7_9_common.h"
|
#include "arm7_9_common.h"
|
||||||
#include "arm_simulator.h"
|
#include "arm_simulator.h"
|
||||||
|
|
Loading…
Reference in New Issue