Most files in the tree seem to have ended up including this, and *quite* needlessly ... only code implementing or using breakpoints actually needs these declarations.
So take it out of the header files which included it, and put it in files which use it ... reduce needless interdependencies. --- src/server/gdb_server.c | 1 + src/target/arm11.c | 1 + src/target/arm7_9_common.c | 1 + src/target/arm7_9_common.h | 1 - src/target/armv4_5.c | 1 + src/target/armv7m.c | 1 + src/target/cortex_a8.c | 1 + src/target/cortex_m3.c | 1 + src/target/mips_m4k.c | 1 + src/target/target.c | 1 + src/target/target.h | 3 ++- src/target/xscale.c | 1 + 12 files changed, 12 insertions(+), 2 deletions(-) --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -28,6 +28,7 @@ #endif #include "gdb_server.h" +#include "breakpoints.h" #include "target_request.h" #include "register.h" #include "server.h" --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -27,6 +27,7 @@ #endif #include "arm11.h" +#include "breakpoints.h" #include "arm11_dbgtap.h" #include "armv4_5.h" #include "arm_simulator.h" --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -30,6 +30,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "embeddedice.h" #include "target_request.h" #include "arm7_9_common.h" --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -29,7 +29,6 @@ #ifndef ARM7_9_COMMON_H #define ARM7_9_COMMON_H -#include "breakpoints.h" #include "armv4_5.h" #define ARM7_9_COMMON_MAGIC 0x0a790a79 /**< */ --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -28,6 +28,7 @@ #endif #include "armv4_5.h" +#include "breakpoints.h" #include "arm_disassembler.h" #include "binarybuffer.h" --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -34,6 +34,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "armv7m.h" #define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0]))) --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -33,6 +33,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "cortex_a8.h" #include "armv7a.h" #include "armv4_5.h" --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -31,6 +31,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "cortex_m3.h" #include "target_request.h" #include "target_type.h" --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "mips32.h" #include "mips_m4k.h" #include "mips32_dmaacc.h" --- a/src/target/target.c +++ b/src/target/target.c @@ -36,6 +36,7 @@ #include "target.h" #include "target_type.h" #include "target_request.h" +#include "breakpoints.h" #include "time_support.h" #include "register.h" #include "trace.h" --- a/src/target/target.h +++ b/src/target/target.h @@ -28,13 +28,14 @@ #include <stddef.h> -#include "breakpoints.h" #include "algorithm.h" #include "command.h" struct reg; struct trace; struct command_context; +struct breakpoint; +struct watchpoint; /** --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#include "breakpoints.h" #include "xscale.h" #include "target_type.h" #include "arm7_9_common.h" _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development