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://git.sur5r.net/?a=commitdiff_plain;h=8193f17c3aeb948ca8f70ed3361e8b2bccefffed;p=openocd 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 cdeb4200..46f332e1 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 7bfb97dc..5d83517b 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 76c79c3a..780ccf92 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 51fbddfe..ba993ee4 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 fd61020d..fca3743d 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 00b78652..f305390b 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 1b7b6452..8e8f4d63 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 56b6206d..9aac806e 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 120d5b92..a353c132 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 e6e0bd7e..884f8f65 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 6c0b881a..ea46488c 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 625c3a9a..facd1505 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 3f9e7f55..7ccdf546 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 832efe92..f099be94 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 f11d9dda..230008a5 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 35ca5a5c..e4949d20 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 ed083237..759c2bc7 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 292504be..4a7cf12f 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 e65cd5a3..72474cd0 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 4c94e6bf..e70df107 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 03a5afca..8c052766 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 6432a903..6ba433c3 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 7a4ba575..1ac682b8 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 fff401c1..d1d34810 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 f26835bd..bb046a1c 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 c21edf64..84d2aaad 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 d8977e21..30ca3bf3 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"