diff options
author | Amitay Isaacs <amitay@ozlabs.org> | 2018-05-24 15:50:09 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-05-24 21:19:34 +1000 |
commit | 517e99b38ce2ad70ef90b6c5974c97522d1a42ef (patch) | |
tree | 6b08542b01c73e814fec65b3e0638fa885b86663 /src | |
parent | 55d2081b94b380dd315b97f7167da7e65af887d5 (diff) | |
download | pdbg-517e99b38ce2ad70ef90b6c5974c97522d1a42ef.tar.gz pdbg-517e99b38ce2ad70ef90b6c5974c97522d1a42ef.zip |
main: Do not include libpdbg internal headers
There are few execptions:
- src/thread.c, src/htm.c
These require bitutils.h. The correct fix might be to include thread
abstraction in libpdbg.
- src/main.c
This requires target.h.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/cfam.c | 2 | ||||
-rw-r--r-- | src/htm.c | 5 | ||||
-rw-r--r-- | src/htm.h | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/main.h | 4 | ||||
-rw-r--r-- | src/mem.c | 4 | ||||
-rw-r--r-- | src/reg.c | 3 | ||||
-rw-r--r-- | src/scom.c | 2 | ||||
-rw-r--r-- | src/scom.h | 2 | ||||
-rw-r--r-- | src/thread.h | 2 |
10 files changed, 11 insertions, 17 deletions
@@ -19,8 +19,6 @@ #include <string.h> #include <inttypes.h> -#include <target.h> - #include "main.h" static int getcfam(struct pdbg_target *target, uint32_t index, uint64_t *addr, uint64_t *unused) @@ -29,11 +29,12 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <assert.h> #include <ccan/array_size/array_size.h> -#include <target.h> -#include <operations.h> +#include <libpdbg.h> +#include <bitutils.h> #include "main.h" @@ -16,8 +16,6 @@ #include <inttypes.h> #include <stdio.h> -#include <target.h> - int run_htm_start(int optind, int argc, char *argv[]); int run_htm_stop(int optind, int argc, char *argv[]); int run_htm_status(int optind, int argc, char *argv[]); @@ -31,9 +31,9 @@ #include <config.h> #include <libpdbg.h> +#include <target.h> #include "main.h" -#include "bitutils.h" #include "cfam.h" #include "scom.h" #include "reg.h" @@ -13,9 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include <inttypes.h> +#include <stdbool.h> -#include <target.h> +#include <libpdbg.h> enum backend { FSI, I2C, KERNEL, FAKE, HOST }; @@ -19,9 +19,9 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <assert.h> -#include <operations.h> -#include <target.h> +#include <libpdbg.h> #include "main.h" #include "progress.h" @@ -19,8 +19,7 @@ #include <stdlib.h> #include <string.h> -#include <target.h> -#include <operations.h> +#include <libpdbg.h> #include "main.h" @@ -19,7 +19,7 @@ #include <string.h> #include <inttypes.h> -#include <target.h> +#include <libpdbg.h> #include "main.h" @@ -15,6 +15,4 @@ */ #include <inttypes.h> -#include <target.h> - int handle_scoms(int optind, int argc, char *argv[]); diff --git a/src/thread.h b/src/thread.h index 5fc2a80..0c1caa2 100644 --- a/src/thread.h +++ b/src/thread.h @@ -15,8 +15,6 @@ */ #include <inttypes.h> -#include <target.h> - int thread_start(int optind, int argc, char *argv[]); int thread_step(int optind, int argc, char *argv[]); int thread_stop(int optind, int argc, char *argv[]); |