summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@ozlabs.org>2018-05-24 15:50:09 +1000
committerAlistair Popple <alistair@popple.id.au>2018-05-24 21:19:34 +1000
commit517e99b38ce2ad70ef90b6c5974c97522d1a42ef (patch)
tree6b08542b01c73e814fec65b3e0638fa885b86663 /src
parent55d2081b94b380dd315b97f7167da7e65af887d5 (diff)
downloadpdbg-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.c2
-rw-r--r--src/htm.c5
-rw-r--r--src/htm.h2
-rw-r--r--src/main.c2
-rw-r--r--src/main.h4
-rw-r--r--src/mem.c4
-rw-r--r--src/reg.c3
-rw-r--r--src/scom.c2
-rw-r--r--src/scom.h2
-rw-r--r--src/thread.h2
10 files changed, 11 insertions, 17 deletions
diff --git a/src/cfam.c b/src/cfam.c
index 3ba8224..269123e 100644
--- a/src/cfam.c
+++ b/src/cfam.c
@@ -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)
diff --git a/src/htm.c b/src/htm.c
index f276d15..f007354 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -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"
diff --git a/src/htm.h b/src/htm.h
index fef569e..f5ffa76 100644
--- a/src/htm.h
+++ b/src/htm.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[]);
diff --git a/src/main.c b/src/main.c
index 5f76bc7..7528ade 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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"
diff --git a/src/main.h b/src/main.h
index e060553..b1366d9 100644
--- a/src/main.h
+++ b/src/main.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 };
diff --git a/src/mem.c b/src/mem.c
index 71e91d3..dfdcf01 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -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"
diff --git a/src/reg.c b/src/reg.c
index d094fbe..002cfe9 100644
--- a/src/reg.c
+++ b/src/reg.c
@@ -19,8 +19,7 @@
#include <stdlib.h>
#include <string.h>
-#include <target.h>
-#include <operations.h>
+#include <libpdbg.h>
#include "main.h"
diff --git a/src/scom.c b/src/scom.c
index 4073d88..4c59e2a 100644
--- a/src/scom.c
+++ b/src/scom.c
@@ -19,7 +19,7 @@
#include <string.h>
#include <inttypes.h>
-#include <target.h>
+#include <libpdbg.h>
#include "main.h"
diff --git a/src/scom.h b/src/scom.h
index 890207f..d4325b5 100644
--- a/src/scom.h
+++ b/src/scom.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[]);
OpenPOWER on IntegriCloud