summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-12-10 19:19:57 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-11 00:11:34 +0100
commitc5a6bfecefda379e23daddc1e743360dcde8b73d (patch)
tree14fe52bf376041d91db9513acf2806d9c5fa2df8
parente16248d97c0775476947b8dfd24ff5e1ac822128 (diff)
i386/i386/db_trace.c: remove forward declaration
* i386/Makefrag.am: List i386/i386/db_trace.h. * i386/i386/db_trace.c: Include machine/db_trace.h. (db_i386_stack_trace): Remove forward declaration. * i386/i386/db_trace.h: New file. Add copyright. [_I386_DB_TRACE_H_]: Add ifndef. (i386_frame): Declare forward. (db_i386_stack_trace): Add prototype.
-rw-r--r--i386/Makefrag.am1
-rw-r--r--i386/i386/db_trace.c9
-rw-r--r--i386/i386/db_trace.h32
3 files changed, 34 insertions, 8 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 23437c6..cac2267 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -83,6 +83,7 @@ libkernel_a_SOURCES += \
i386/i386/db_interface.h \
i386/i386/db_machdep.h \
i386/i386/db_trace.c \
+ i386/i386/db_trace.h \
i386/i386/debug.h \
i386/i386/debug_i386.c \
i386/i386/debug_trace.S \
diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c
index fb65524..b9c46a6 100644
--- a/i386/i386/db_trace.c
+++ b/i386/i386/db_trace.c
@@ -36,6 +36,7 @@
#include <machine/db_machdep.h>
#include <machine/machspl.h>
#include <machine/db_interface.h>
+#include <machine/db_trace.h>
#include <ddb/db_access.h>
#include <ddb/db_command.h>
@@ -312,14 +313,6 @@ db_nextframe(
}
}
-void
-db_i386_stack_trace(
- thread_t th,
- struct i386_frame *frame,
- db_addr_t callpc,
- db_expr_t count,
- int flags); /* forward */
-
#define F_USER_TRACE 1
#define F_TRACE_THREAD 2
diff --git a/i386/i386/db_trace.h b/i386/i386/db_trace.h
new file mode 100644
index 0000000..604654c
--- /dev/null
+++ b/i386/i386/db_trace.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _I386_DB_TRACE_H_
+#define _I386_DB_TRACE_H_
+
+struct i386_frame;
+
+void
+db_i386_stack_trace(
+ thread_t th,
+ struct i386_frame *frame,
+ db_addr_t callpc,
+ db_expr_t count,
+ int flags);
+
+#endif /* _I386_DB_TRACE_H_ */