From: David Brownell Date: Mon, 16 Nov 2009 08:35:14 +0000 (-0800) Subject: target: no implicit #includes of "register.h" X-Git-Tag: v0.4.0-rc1~588 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=8193f17c3aeb948ca8f70ed3361e8b2bccefffed target: no implicit #includes of "register.h" Same deal: "register.h" got needlessly included all over the place because of being in a few widely included headers. So take it out of the header files which included it, and put it in files which use it ... reduce needless interdependencies. Also, don't need that extra "types.h" inclusion. Signed-off-by: David Brownell --- diff --git a/src/target/arm11.c b/src/target/arm11.c index cdeb420039..46f332e1a5 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -34,6 +34,7 @@ #include "time_support.h" #include "target_type.h" #include "algorithm.h" +#include "register.h" #if 0 diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 7bfb97dce3..5d83517b1e 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -27,6 +27,7 @@ #include "arm720t.h" #include "time_support.h" #include "target_type.h" +#include "register.h" /* diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 76c79c3abd..780ccf9273 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -37,6 +37,7 @@ #include "time_support.h" #include "arm_simulator.h" #include "algorithm.h" +#include "register.h" /** diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index 51fbddfe9a..ba993ee467 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -29,6 +29,7 @@ #include "arm7tdmi.h" #include "target_type.h" +#include "register.h" /* diff --git a/src/target/arm920t.c b/src/target/arm920t.c index fd61020de4..fca3743d18 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -24,6 +24,7 @@ #include "arm920t.h" #include "time_support.h" #include "target_type.h" +#include "register.h" /* diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 00b78652b9..f305390b28 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -27,6 +27,7 @@ #include "arm926ejs.h" #include "time_support.h" #include "target_type.h" +#include "register.h" /* diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 1b7b64529e..8e8f4d63db 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -29,6 +29,7 @@ #include "arm9tdmi.h" #include "target_type.h" +#include "register.h" /* diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 56b6206da9..9aac806ecf 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -24,7 +24,6 @@ #define ARM_ADI_V5_H #include "target.h" -#include "register.h" #include "arm_jtag.h" #define DAP_IR_DPACC 0xA diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 120d5b9273..a353c132a3 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -28,6 +28,7 @@ #include "arm_disassembler.h" #include "arm_simulator.h" #include "binarybuffer.h" +#include "register.h" static uint32_t arm_shift(uint8_t shift, uint32_t Rm, diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index e6e0bd7e35..884f8f6533 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -32,6 +32,7 @@ #include "arm_disassembler.h" #include "binarybuffer.h" #include "algorithm.h" +#include "register.h" char* armv4_5_core_reg_list[] = diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index 6c0b881ad6..ea46488c90 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -26,7 +26,6 @@ #ifndef ARMV4_5_H #define ARMV4_5_H -#include "register.h" #include "target.h" #include "etm.h" diff --git a/src/target/armv7a.h b/src/target/armv7a.h index 625c3a9ae9..facd15054b 100644 --- a/src/target/armv7a.h +++ b/src/target/armv7a.h @@ -19,7 +19,6 @@ #ifndef ARMV7A_H #define ARMV7A_H -#include "register.h" #include "target.h" #include "arm_adi_v5.h" #include "armv4_5.h" diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 3f9e7f55ac..7ccdf546ca 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -37,6 +37,7 @@ #include "breakpoints.h" #include "armv7m.h" #include "algorithm.h" +#include "register.h" #define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0]))) diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 832efe92fa..f099be9448 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -35,9 +35,8 @@ #include "breakpoints.h" #include "cortex_a8.h" -#include "armv7a.h" #include "armv4_5.h" - +#include "register.h" #include "target_request.h" #include "target_type.h" diff --git a/src/target/cortex_a8.h b/src/target/cortex_a8.h index f11d9ddafc..230008a556 100644 --- a/src/target/cortex_a8.h +++ b/src/target/cortex_a8.h @@ -29,7 +29,6 @@ #ifndef CORTEX_A8_H #define CORTEX_A8_H -#include "register.h" #include "target.h" #include "armv7a.h" diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 35ca5a5c12..e4949d20fa 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -36,6 +36,7 @@ #include "target_request.h" #include "target_type.h" #include "arm_disassembler.h" +#include "register.h" /* NOTE: most of this should work fine for the Cortex-M1 and diff --git a/src/target/cortex_m3.h b/src/target/cortex_m3.h index ed08323758..759c2bc711 100644 --- a/src/target/cortex_m3.h +++ b/src/target/cortex_m3.h @@ -26,7 +26,6 @@ #ifndef CORTEX_M3_H #define CORTEX_M3_H -#include "register.h" #include "target.h" #include "armv7m.h" diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c index 292504beb0..4a7cf12fea 100644 --- a/src/target/embeddedice.c +++ b/src/target/embeddedice.c @@ -28,6 +28,7 @@ #endif #include "embeddedice.h" +#include "register.h" #define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0]))) diff --git a/src/target/etb.c b/src/target/etb.c index e65cd5a356..72474cd09f 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -23,6 +23,7 @@ #include "armv4_5.h" #include "etb.h" +#include "register.h" static char* etb_reg_list[] = diff --git a/src/target/etm.c b/src/target/etm.c index 4c94e6bf05..e70df10751 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -25,6 +25,7 @@ #include "etb.h" #include "image.h" #include "arm_disassembler.h" +#include "register.h" /* diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 03a5afcaef..8c05276692 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -55,6 +55,8 @@ #include "arm926ejs.h" #include "arm966e.h" #include "target_type.h" +#include "register.h" + int feroceon_assert_reset(struct target *target) { diff --git a/src/target/mips32.c b/src/target/mips32.c index 6432a90343..6ba433c38b 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -27,6 +27,7 @@ #endif #include "mips32.h" +#include "register.h" char* mips32_core_reg_list[] = diff --git a/src/target/mips32.h b/src/target/mips32.h index 7a4ba57561..1ac682b88a 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -24,7 +24,6 @@ #define MIPS32_H #include "target.h" -#include "register.h" #include "mips32_pracc.h" diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index fff401c162..d1d34810d8 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -28,6 +28,7 @@ #include "mips_m4k.h" #include "mips32_dmaacc.h" #include "target_type.h" +#include "register.h" /* cli handling */ diff --git a/src/target/register.c b/src/target/register.c index f26835bdea..bb046a1c69 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -24,6 +24,7 @@ #include "config.h" #endif +#include "types.h" #include "register.h" #include "log.h" diff --git a/src/target/register.h b/src/target/register.h index c21edf6498..84d2aaadde 100644 --- a/src/target/register.h +++ b/src/target/register.h @@ -23,8 +23,6 @@ #ifndef REGISTER_H #define REGISTER_H -#include "types.h" - struct target; struct reg diff --git a/src/target/xscale.c b/src/target/xscale.c index d8977e2189..30ca3bf328 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -34,6 +34,7 @@ #include "arm_simulator.h" #include "arm_disassembler.h" #include "time_support.h" +#include "register.h" #include "image.h"