bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 02/08] i386/i386/db_trace.c: remove forward declaration


From: Marin Ramesa
Subject: [PATCH 02/08] i386/i386/db_trace.c: remove forward declaration
Date: Tue, 10 Dec 2013 19:19:57 +0100

* 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.

---
 i386/Makefrag.am     |  1 +
 i386/i386/db_trace.c |  9 +--------
 i386/i386/db_trace.h | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 8 deletions(-)
 create mode 100644 i386/i386/db_trace.h

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 69ba11f..0b78ed8 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_ */
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]